Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Nested extract statements are applied from the outside in. So the left-most json statement applies to the right-most element in the parentheses
  • The entire nested extract statement (created by the cross join) is a json object
  • That json object is then used in the select stanza to get the needed fields within it (by using another json extract statement on it)
    • Note that SQL performs the work in the FROM stanza before it performs the work in the SELECT stanza; that's how it knows about the json object you created through the cross join, and why you can use that object in the Select stanza

The example below uses the folio_users.custom_fields table, which has an embedded array called "values" containg three fields: "id","value" and "default".  The "Values"array is embedded within two preceding text objects:

...