Retrieving multiple objects from Storage

Hi guys I am building a page to send some user inputted information into the database of the server.

I have some product id’s in my Storage.

Like I mentioned in the comments when I use for loop I am able to see every ‘id’ saved in the storage.
but when I exit from the ‘for loop’ the only value I get in my ‘’ is the last id in the storage.

please give me any advice or suggestion in getting multiple id’s into a variable, so that it can be pass along to a function which sends data to the database of the server.

Just create array like shown below. = [];"cart").then((data)=>{
         for(let i=0; i<data.length; i++){
1 Like

@Ankit_Makwana Great it worked, thankyou.

I am trying to insert a list of data to a table I created in database. I’m thinking of using php for data insertion but so far I haven’t come across any good documentation that I could understand…

Can you give advice / suggestion on what to do or where to look for data insertion using php.

Sorry, I don’t know about PHP for inserting data.
But, there is good doc to add data in database with ionic storage. (where you can use indexeddb, sqlite or websql)

Btw there is one blog post which might help you.