cari

Rumah  >  Soal Jawab  >  teks badan

javascript - javascipt json kepada induk penukaran tatasusunan

[{"xc_images":"http:\/\/vrjx.zhed.com\/Public\/mht.jpg"},{"xc_images":"http:\/\/vrjx.zhed.com\/Public\/mht.jpg"},{"xc_images":"http:\/\/vrjx.zhed.com\/Public\/lz.jpg"}]

这样的json怎么转化为 ['http:\/\/vrjx.zhed.com\/Public\/mht.jpg', 'http:\/\/vrjx.zhed.com\/Public\/mht.jpg', 'http:\/\/vrjx.zhed.com\/Public\/mht.jpg']

用JavaScript 怎么转
PHP中文网PHP中文网2709 hari yang lalu906

membalas semua(4)saya akan balas

  • 为情所困

    为情所困2017-07-05 11:05:13

    var arr =[{"xc_images":"http:\/\/vrjx.zhed.com\/Public\/mht.jpg"},{"xc_images":"http:\/\/vrjx.zhed.com\/Public\/mht.jpg"},{"xc_images":"http:\/\/vrjx.zhed.com\/Public\/lz.jpg"}];
    res = arr.map(function(i){return i.xc_images;})
    ["http://vrjx.zhed.com/Public/mht.jpg", "http://vrjx.zhed.com/Public/mht.jpg", "http://vrjx.zhed.com/Public/lz.jpg"]

    balas
    0
  • 女神的闺蜜爱上我

    女神的闺蜜爱上我2017-07-05 11:05:13

    jsonData.map(function (item) { return item.xc_images })

    balas
    0
  • 伊谢尔伦

    伊谢尔伦2017-07-05 11:05:13

    var a = [{"xc_images":"http:\/\/vrjx.zhed.com\/Public\/mht.jpg"},{"xc_images":"http:\/\/vrjx.zhed.com\/Public\/mht.jpg"},{"xc_images":"http:\/\/vrjx.zhed.com\/Public\/lz.jpg"}];
    
    var res = a.map(e => e.xc_images); 
    
    console.log(res); 

    balas
    0
  • 扔个三星炸死你

    扔个三星炸死你2017-07-05 11:05:13

    Tukar rentetan menjadi objek dan kemudian kendalikannya

    balas
    0
  • Batalbalas