“ESQL Create JSON Array” Ответ

JS Create JSON Array

var employees = {
    accounting: []
};

for(var i in someData) {    

    var item = someData[i];   

    employees.accounting.push({ 
        "firstName" : item.firstName,
        "lastName"  : item.lastName,
        "age"       : item.age 
    });
}
Nutty Narwhal

ESQL Create JSON Array

{
	"referenceId": "2022-04-21T13:13:14.412+02:00",
	"deliveryAddress": {
		"companyName": "Skellefteå kommun",
		"attention": "Internservice reception",
		"addressRow1": "Trädgårdsgatan 6",
		"addressRow2": " ",
		"postalCode": "93185",
		"city": "Skellefteå",
		"country": "SE"
	},
	"cards": [
		{
			"referenceId": "2022-04-21T13:13:14.307018+02:00",
			"firstName": "ååå",
			"lastName": "äää",
			"title": " ",
			"section": " ",
			"administration": " ",
			"employmentId": " ",
			"layout": "skeKom",
			"cardType": "MB831B"
		},
		{
			"referenceId": "2022-04-21T13:13:14.307018+02:00",
			"firstName": "ååå",
			"lastName": "äää",
			"title": " ",
			"section": " ",
			"administration": " ",
			"employmentId": " ",
			"layout": "skeKom",
			"cardType": "MB831B"
		}
      ]
Per Dinborn

Ответы похожие на “ESQL Create JSON Array”

Вопросы похожие на “ESQL Create JSON Array”

Больше похожих ответов на “ESQL Create JSON Array” по JavaScript

Смотреть популярные ответы по языку

Смотреть другие языки программирования