Is there a way to query JSON stored in the database using keys?
Postgres has JSON operators for this as an example.
Is there a way to query JSON stored in the database using keys?
Postgres has JSON operators for this as an example.
In a way you can, but the Store value will not be JSON, we can store them as text speficic there there own datatype. like this
you can create a entity called JASON
and anoterh entity parameter
which has two field. let say Key
& value
…
when every you get a jason and want to store its values into database, your can
create a JSON
and then for each parameter you need to create a seperate thing. and store the key in field one and value in field two. you ca also add antoher filed into parameter whcih link it to parent jason.
they way if you want to search a key, you can add a constraint to limit it with key and also with the jason it belongs to and then you will get all the key and the value.
but if you store the received JASON as a text and then you want to search a specific key it will cost a lot of WU, because bubble have to trevesr in entire text just for that key.
In below image you can see we have one jason object, and a list of key object related to that json.
Interesting workaround. Would this approach work for nested data?