Indi Singh Sall
Indi Singh Sall

Reputation: 23

How can i query something specific out of this nested JSON type column in Bigquery

I have a column called context: see below I have a column called context: see below

And I want to query out the highlighted part -7efdfa8e2df075bd

I am using this and it isn't working. JSON_EXTRACT_SCALAR(context,'$.id') Any suggestions?

Upvotes: 1

Views: 53

Answers (1)

Sergey Geron
Sergey Geron

Reputation: 10222

id is positioned inside device.

Try JSON_EXTRACT_SCALAR(context,'$.device.id')

Upvotes: 1

Related Questions