This question has already been answered:
- How short circuits work in JavaScript 6 responses
If I try to create a section object, the script in this section falls. Why?
for (var i = 0; i < hrefs.length; i++) { $.ajax({ url: "https://cors-anywhere.herokuapp.com/http://vm1.culture.ru/abramtsevo/catalog/" + hrefs[i], type: 'POST', async: false, success: function(painting) { var link = "http://vm1.culture.ru" + $(painting).find('.catalog-detail__image img').attr('src'); var filename = fileName(link); var name = $(painting).find('h1').text(); var [ , author] = name.split(': '); var values = []; $(painting).find('.catalog-detail__properties__row .catalog-detail__properties__row__right').each(function() { values.push($(this).text()); }) var material = values[2]; var scale = values[5]; var the_creation_of_information = $(painting).find('.catalog-detail__image-title').text(); var [date] = the_creation_of_information.split('., ');; var museum = values[0]; var city = values[4]; var notation = $(painting).find('.catalog-detail__annonce__text').text(); section: { link[i] = link; filename[i] = filename; name[i] = name; author[i] = author; material[i] = material; scale[i] = scale; date[i] = date; museum[i] = museum; city[i] = city; notation[i] = notation; }; } });; } I want to create it, and then immediately send to the server as JSON.
sessionobject, and it’s not clear what you want to do, or send another request, or remove a variable from the current request - Grundy