krv
krv

Reputation: 2930

Nativescript store JSON data in sqlite

I have some JSON data coming in from an API that I want to store it in a Nativescript app.

Is there a way I can store in a simple way to sqlite database.

Currently, I am using loops to iterate over the data and store them in rows in sqlite.

I have tried using application-settings seen here http://docs.nativescript.org/api-reference/modules/_application_settings_.html

I plan to store contact details of 1000s of people. So for that which is the best way to go about it.

Kindly do let me know any other ways that can handele JSON data.

Upvotes: 1

Views: 787

Answers (1)

Nathanael
Nathanael

Reputation: 5399

Disclaimer I'm the author of both nativescript-sqlite and of nativescript-localstorage.

SQLite is very useful if you need to do searches and sql queries against the data; unions, filtering, etc.

However if all you need to do is store the data as (i.e. like a NoSQL database); you can use my nativescript-localstorage plugin to store the data as an object and then re-load it when you need it.

Upvotes: 3

Related Questions