Hello everyone, hope you doing great.
I am newbie here, i started a code but i can’t go further.
Here is the issue i want to get JSON text from the site to my app in ListView or Textbox by just pressing a button.
This is my JSON code that i want to be shown on my app.
Or here is the link https://day-dream.000webhostapp.com/index.json
Raw style:
{“result”:{“Name”:“Jeff A.”,“Phone”:17885555435,“Gender”:“Male”,“RegDATE”:“02/06/2020”,“Level”:{“status”:“Moderator”,“level”:“30”,“value”:2},“Email”:“jeff*****@gmail.com”,“Active”:1},“time”:“06/15/2020 - 04:35:13.584”}
With this code when i get data in my app all the json text appears on textbox like this: {“result”:{“Name”:Jeff. A,“Phone”:17885555**,*“Ge…, i don’t want to appear all the text
i want to show in my text box only: Name, Gender, Phone, and Email
like this
Name: Jeff A. Gender: Male Phone: 01290129102 Email: Jeff***@gmail.com*
Like this i want to be shown on my Textbox1
please help me.
First of all, it would have been nice if you would have posted proper json. I made this out of it:
{ “result”: { “Name”: “Jeff.A”, “Phone”: 17885555, “Gender”: “Male”, “RegDATE”: “02/06/2020”, “Level”: { “status”: “Moderator”, “level”: “30”, “value”: 2 }, “Email”: “Jeff*****@gmail.com”, “time”: “06/15/2020 - 04: 35: 13.584” } }
I used a dictionary to decode your json, and as a start, I came up with this:
Make a global variable called resultDict.
Do your JSON decode, and set global resultDict to the value under key "result" .
Code a procedure names ADD_Key with a parameter named myKey: set Label1.Text to JOIN('\n', myKey, ':', (get value for key myKey in dictionary resultDict)