Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 04-07-2015 01:27 AM - edited 09-16-2022 02:26 AM
I have a simple JSON dataset as below. How do I query all parts.lock
JSON:
{ "id": 1, "name": "A green door", "price": 12.50, "tags": ["home", "green"], "parts" : [ { "lock" : "One lock", "key" : "single key" }, { "lock" : "2 lock", "key" : "2 key" } ] }
Query:
select id,name,price,parts.lock from product
The point is if I use parts[0].lock it will return one row as below:
{u'price': 12.5, u'id': 1, u'.lock': {u'lock': u'One lock', u'key': u'single key'}, u'name': u'A green door'}
But I want to return all the locks in the parts structure.
Please help me with this, thanks !