Invalid JSON Path _id.$oid bigquery

21 views Asked by At

I have this JSON data in a BigQuery column:

SELECT JSON '{"$oid":"123"}'

How can I get the $oid value?

Expected output: 123

1

There are 1 answers

1
luisvenezian On
  SELECT JSON_QUERY(JSON '{"$oid":"123"}', '$."$oid"')