I am trying to get all the values ββof a specific attribute from a json array. Given the following json, I am trying to get all types, e.g. iPhone, home
{ "firstName": "John", "lastName" : "doe", "age" : 26, "address" : { "streetAddress": "naist street", "city" : "Nara", "postalCode" : "630-0192" }, "phoneNumbers": [ { "type" : "iPhone", "number": "0123-4567-8888" }, { "type" : "home", "number": "0123-4567-8910" } ] }
I use $.phoneNumbers[*].type , which works fine on online parsers but when I use it in a large request:
select json_extract(my_column,'$.phoneNumbers[*].type') from my_table
I get:
JSONPath parse error at: [*].type
source share