【问题标题】:Get value of xsi:type with javascript使用 javascript 获取 xsi:type 的值
【发布时间】:2015-03-22 07:59:47
【问题描述】:

我正在使用 AngularJS。从 SOAP 获得响应。

读取 xsi:type 的值时遇到问题

[{"attributes":{"xsi:type":"TicketNote"}]

如何仅使用 Javascript 或 AngularJS 获取 xsi:type 的值。

【问题讨论】:

    标签: javascript json soap


    【解决方案1】:
    var obj =[{"attributes":{"xsi:type":"TicketNote"}}];
    console.log(obj[0].attributes["xsi:type"]);
    

    【讨论】:

    • 我应该提到这是一个对象而不是数组,但是将其更改为数组并使用它可以解决我的问题
    猜你喜欢
    • 2012-02-07
    • 1970-01-01
    • 1970-01-01
    • 2011-09-14
    • 2019-04-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多