List of Lists as Value in Dictionary - Not Working?

I want to put some lists of lists in a dictionary. I'm getting strange results. Shouldn't I be able to do this?

Works fine for me

This is because your use the same names so it picks the last one. MARK 4 and JOHN 3. The names should be unique.

1 Like

Really? The dictionary will work, or not work, depending on what's in it? When you say "names", these are data values. So if I have a dictionary with a thousand items in it, and the user happens to enter some values that are the same, it breaks?

I'm am new to all this, but that doesn't seem right.

You should undestand the json structure of dictionary, within an object you can not have two identical keys


but you can have an array with objects with same keys


I use jsonparseonline to check my json's stucture and I believe this guide might help you

1 Like

I'll study on this. I need to know JSON better.

1 Like

Actually, this is a bug in App Inventor that causes the list of lists to be coerced into a dictionary rather than keeping the provided structure. Someone has submitted a fix and it will be in the next release.

1 Like

If i remember right it is this one

The ai2-test server works okay for this.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.