“ESQL Buat array JSON” Kode Jawaban

JS membuat array JSON

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 Buat array JSON

{
	"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

Jawaban yang mirip dengan “ESQL Buat array JSON”

Pertanyaan yang mirip dengan “ESQL Buat array JSON”

Lebih banyak jawaban terkait untuk “ESQL Buat array JSON” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya