Json mystery !!

1839 views
Skip to first unread message

rudy Serroyen

unread,
Nov 12, 2015, 8:56:41 AM11/12/15
to mitappinv...@googlegroups.com
Hy

I made diagram It does not work 

The data are here
{"channel":{"id":64246,"name":"Arduino Based Vent Damper Controlled","description":"Pour le feux  à pelet","field1":"S_D_B-Tem","field2":"S_D_B-Clapet","field3":"Room_1-Tem","field4":"Room_1-Clapet","field5":"Room_G-Tem","field6":"Room_G-Clapet","field7":"Room_S-Tem","field8":"Room_S-Clapet","created_at":"2015-11-05T17:23:27Z","updated_at":"2015-11-11T21:15:16Z","last_entry_id":2},"feeds":[{"created_at":"2015-11-11T21:15:16Z","entry_id":2,"field1":"20","field2":"90","field3":"19","field4":"90","field5":"18","field6":"0","field7":"18.5","field8":"0"}]}

Select list item: Attempt to get item number 5 of a list of length 1: (((created_at 2015-11-11T21:15:16Z) (entry_id 2) (field1 20) (field2 90) (field3 19) (field4 90) (field5 18) (field6 0) (field7 18.5) (field8 0)))

What is wrong.

Thank you



Message has been deleted

Taifun

unread,
Nov 12, 2015, 12:04:00 PM11/12/15
to MIT App Inventor Forum
each bracket pair represents a list
therefore first you have to select the first item from the main list and then item 5 from the sublist to get field3 19
it helps to use Do it to debug your blocks, see also tip 4 here  

but probably you are only interested in the value 19?
in this case use the loopup in pairs block



Taifun

Abraham Getzler

unread,
Oct 19, 2016, 12:18:24 PM10/19/16
to MIT App Inventor Forum
Also see this sample Web Page Shredder app in the Gallery:

ABG
Reply all
Reply to author
Forward
0 new messages