I parse my json as a array or as a dictionary. Not really confident with my answer but I will confirm my findings once I get in front of my workload on my computer
I figured out what the problem is. I had assumed that my variable x was supposed to be my object, but what it really was, was an integer.
I went back to the drawing board to locate the actual object and got it to display what I wanted.
So... problem solved!
range only accept an integer or other object that can be interpreted like one.
Maybe the line when you get the items [x = my_request["jsonObject"]["items"] ] is wrong, you got the number of items not the items.
Good for you @crhodes, remember always read the doc about functions that you use.
Here's a better screenshot. It should make things clear:
From line 1 to line 36, that is just one item. The a, b, c... are attribute related to the item. In fact, b was changed to itemInfo and inside itemInfo are attributes like form, shape, and color, and everything from url to payload are inside itemInfo dropbox.com/s/w2jsmja0b83kky6/Scre...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Check this code:
In the screenshot you have a an array of items right ? Is something like this:
range
only accept an integer or other object that can be interpreted like one.Maybe the line when you get the items is wrong, you got the number of items not the items, how are you parsing the
JSON
from the request ?I parse my json as a array or as a dictionary. Not really confident with my answer but I will confirm my findings once I get in front of my workload on my computer
I figured out what the problem is. I had assumed that my variable x was supposed to be my object, but what it really was, was an integer.
I went back to the drawing board to locate the actual object and got it to display what I wanted.
So... problem solved!
I said that in the below comment:
Good for you @crhodes, remember always read the doc about functions that you use.
Here's a better screenshot. It should make things clear:
From line 1 to line 36, that is just one item. The a, b, c... are attribute related to the item. In fact, b was changed to itemInfo and inside itemInfo are attributes like form, shape, and color, and everything from url to payload are inside itemInfo
dropbox.com/s/w2jsmja0b83kky6/Scre...