Invalid JSON Path _id.$oid bigquery

54 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 best solutions below

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