jsonextractindex
This section contains reference documentation for the JSONEXTRACTINDEX function.
Last updated
Was this helpful?
Was this helpful?
SELECT id, jsonextractindex(repo, '$.name', 'STRING') AS name
FROM githubEvents
WHERE id = 7044874109SELECT id, jsonextractindex(repo, '$.foo', 'STRING', 'dummyValue') AS name
FROM githubEvents
WHERE id = 7044874109SELECT id, jsonextractindex(repo, '$.name', 'STRING', 'dummyValue', '"$.id" < 10') AS name
FROM githubEvents
WHERE id = 7044874109SELECT repo
FROM myTable
WHERE id = 123SELECT id, jsonextractindex(repo, '$.arrayField[*].f1', 'STRING', '[]') AS arrayValues
FROM myTable
WHERE id = 123SELECT id, jsonextractindex(repo, '$.arrayField[*].f1', 'STRING', '[]', '"$.arrField[*].f2" > 2') AS arrayValues
FROM myTable
WHERE id = 123SELECT id, jsonextractindex(repo, '$.arrayField[*].f1', 'STRING', '[]', '"$.arrField[*].nonExistant" > 99999') AS arrayValues
FROM myTable
WHERE id = 123