Answer the question
In order to leave comments, you need to log in
How to write an array to JSON?
Good evening everyone.
I fill out the form, push all the values into an array, then I need to write this array into JSON.
How can I implement this? (First time dealing with JSON)
let i = 0;
let spisok = [];
let prev;
function sendSpisok(){
while (i < 7){
prev = $('.mess')[i];
spisok.push(prev.value);
$('.txt').append('<p class="txtp">' + spisok[i] + '</p>');
i++;
}
console.log(spisok);
spisok = [];
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question