How can I access the value and key of JSONs?
Here is the example but i want to access certain value which has these key inside of it.
How can I access the value and key of JSONs?
Here is the example but i want to access certain value which has these key inside of it.
Pull in the Web component, and look for its block that decodes JSON into a dictionary.
Work your way inside step by step into separate global variables, to help debug using Do It.
Don't try to parse it in one big gulp the first time. You will choke.
P.S. for {} levels, you will need dict key lookup.
For [] levels, you will need list select item number lookup.
If you post that image as text, then someone might show you how to extract values....
The json (I OCR'd the image)
{"kind": "identitytoolkit#GetAccountinfoResponse",
"users":
[
{
"localId": "nyrlBazCmLRD01PV2WUDiwow2162",
"email": "james@gmail.com",
"passwordHash": "UkVEQUNURUQ=",
"emailVerified":false,
"passwordUpdatedAt": 1667888398433,
"providerUserInfo": [
{
"providerId": "password",
"federatedId": "james@gmail.com",
"email": "james@gmail.com",
"rawld": "james@gmail.com"
}
],
"valid Since": "1667888398",
"lastLogin At": "1667938746668",
"createdAt": "1667888398433",
"lastRefreshAt": "2022-11-08T20:19:06.668Z"
}
]
}
Examples. I have done these "long hand" to help you see how you need to work through the json {...}
and the lists [...]
within the json
Get the email value from users
returns: "james@gmail.com
"
Get the providerId from providerUserInfo from users
returns: "password"
Thank you for your answers, Helps a lot. I'm just trying to studying it by displaying such values so I can deeply understand on how these things works. I appreciated your efforts Thank you again.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.