Hi everyone!
I am using the ionic native SQLite plugin: @ionic-native/sqlite - npm to store some information in my hybrid mobile application.
My doubt, it is the following one: is it possible to include the JSON1 extension?
In my case, I need to do some queries using the json_extract() function because I am storing an object as JSON in a specific column of my database.
So now, I can’t do this query, because the ionic plugin doesn’t recognise the json_extract function:
In this example I need to obtain the sectionId value, that is in the column gf.field (this is a JSON object that has the sectionId property).
SELECT s.id, gf.field, json_extract(gf.field,'$.sectionId') AS fieldSectionId FROM sections s
WHERE s.orderId = '123' and gf.itemId='item1' and fieldSectionId = s.sectionId`;
btw, I am using the latest version of this plugin: “@ionic-native/sqlite”: “^5.34.0”
Thanks in advance!
1 post - 1 participant