J
J
jenya_zhilin2020-05-05 15:47:45
JavaScript
jenya_zhilin, 2020-05-05 15:47:45

How to get token from JSON and output to JS?

Good afternoon. The goal is to solve the following problem:

Write an application in JS that receives a token or an error from a json file (will be issued within an hour).

If you have a token, add it to Cookies.
If there is no token, display an error as a notification.

Mandatory condition:
the length of the token is 32 characters, the last character must be the symbol =, the thirteenth and fifteenth - !

How to implement this, just with JSON there is no experience at all?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2020-05-05
@jenya_zhilin

JSON.parse

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question