Last active
April 15, 2021 20:26
-
-
Save Josimar16/f2851f228521f41c657339a6ea0f8b01 to your computer and use it in GitHub Desktop.
Mapear valores dentro de uma coluna json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- recupera a chave -> | |
-- recupera o texto da chave ->> | |
-- recupera valor dentro do array #> | |
-- indice do array '{0}' | |
-- {"um_campo_array_dentro_do_json": [{"chave_dentro_do_array": 1}]} | |
coluna_json -> 'um_campo_array_dentro_do_json' #> '{0}' -> 'chave_dentro_do_array' | |
-- {"object_dentro_json": {"chave_dentro_object": 1}} | |
coluna_json -> 'object_dentro_json' ->> 'chave_dentro_object' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment