Versions Compared

Key

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

...

    • you don't need the 'cross join lateral' expression if you use nested json extract statements in the Select stanza; the cross join makes it less confusing, but the result is the same. However, you DO need to use a cross join if you are including ordinality of values in the results.
    • to use nested json statements in this example: in the Select stanza, wherever you see "depts.jsonb", replace it with  jsonb_array_elements (jsonb_extract_path (users.jsonb,'departments')), and remove the cross join lateral line in From

RESULT: