Hi can any one help me to fix this problem
i want to connect data with my app by API i did that and i get the JOSN response
but now i need to create row for each items but it not work
Thank You
Hi can any one help me to fix this problem
i want to connect data with my app by API i did that and i get the JOSN response
but now i need to create row for each items but it not work
Thank You
You need to use the get object from JSON
block instead of the generate JSON from object
block.
If you still have trouble, post the full text of the JSON response here (not as a screenshot, actual text).
hi @tatiang thanks for your replay
i try what you say but its not work its giving me
[ object Object ]
this is the the full text of the JSON response
“{“records”:[{“id”:1,“Name”:“bader”,“created_at”:“2021-10-04T20:30:45.764Z”,“updated_at”:“2021-10-04T21:41:13.903Z”},{“id”:2,“Name”:“yazan”,“created_at”:“2021-10-04T21:39:29.511Z”,“updated_at”:“2021-10-04T21:41:08.218Z”}]}”
i have 3 record for each row
Name
created_at
updated_at
That text is invalid JSON. Is there any way you can send me the Web API url you’re using? Or maybe try copying the text again and pasting it in Best JSON Viewer and JSON Beautifier Online? If you click “Tree Viewer” on that site, you should get formatted JSON that you can then post here as a screenshot. I’m just trying to confirm that your JSON is valid and so far it is not.
this the API URL
Authorization: Bearer 63nte6l7hui9ac1ifjlgdzhxi
Content-Type: application/json
Thanks. Here’s the raw JSON response (I used Postman to generate it):
{“records”:[{“id”:1,“Name”:“bader”,“created_at”:“2021-10-04T20:30:45.764Z”,“updated_at”:“2021-10-04T21:41:13.903Z”},{“id”:2,“Name”:“yazan”,“created_at”:“2021-10-04T21:39:29.511Z”,“updated_at”:“2021-10-04T21:41:08.218Z”}]}
And formatted at codebeautify:
Your blocks for the “Name” property should work but not for the “Image” property because it doesn’t exist. What happens if you just assign the value of get property "Name" of object j
to a label? Can you see the value then?
Edit: Actually, I think you’ll need to get the property name “records” first, then loop through that value as a list to get the “Name” property.
It not work at all I had tried everything
About property image I deleted it because of that
It’s not showing up in josn text
Your JSON is a list. You need first to convert the JSON to object then you need to loop using for each item in....
block using get property....
object block and use the name “records”.
“It not work at all” is really not helpful information. Post a screenshot of your blocks. Otherwise, there’s no way I can know what you’ve done wrong and how to fix it.
Thank you munir for your reply
What you mean of ( use the name “records” )
Use it in the get property "records" of object....
block.
I can show you an example later in the day.
thank you munir that will be very helpful
You are doing it wrong. It won’t work this way.
You’re close. Very helpful to see your screenshot!
Because the object has “records” at the top of the tree (in this screenshot), you need to first get the property “records” of app variable Get Value
and set that to something like app variable Records List
. Then, loop through for each item j in list
with the list value being app variable Records List
. And then get property "Name" of object j
. Assign that to a label to see if the values are what you expect.
I’ll see if I can make you an example screenshot.
this difficult hhhhh
It looks so complicated, I don’t understand how to do it. Yes please, some screenshots will be very useful so that I understand what you mean
See this quick sample
Output
I used the JSON string instead of the Web API
just to make it simpler and faster to show.
Hope this can answer your question.
Glad to hear that it’s working.