Click here to Skip to main content
15,742,120 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
function Submit(payload) {
    let arry = [];
    for (let x = 0; x < payload.Idetails.length; x++) {

data would be json

I want to save list of json

What I have tried:

on success return am just saving json return data in resultArry.push(data)
but its not working.
Need help on this.
Updated 26-Apr-23 4:15am
Richard Deeming 26-Apr-23 8:17am    
This is the same as the question you posted two days ago, just with less useful information in it:
How to use for loop in java script in ajax call to execute multiple iteration?[^]

The answer has not changed. And as I said, if the solution I posted doesn't do what you want, then you need to explain clearly and precisely what you want.
Salt Pepper 26-Apr-23 10:10am    
That is working properly Thanks for your reply Richard Deeming.
This question is completely different
On Each iteration on success, some response I will get. resultArry.push(data);
I need to keep it in list. finally i need to send list of data.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900