0
嗨,我是从一个SOAP服务获得的数据和转换XML到JSON和获取我需要这样的价值:Lodash深挑
console.log(result['soap:Envelope']['soap:Body']['ns2:getFichaGeneralResponse']['return']['instituciones']['datosPrincipales']['registros'][1].valor)
有没有办法做这样的事情?
console.log(_.pick(result, 'registros'))
因此,我可以得到一个对象与我需要的信息?
如何看起来'result'变量?它的结构是什么?此console.log抛出一个错误'console.log(result ['soap:Envelope'] ['soap:Body'] ['ns2:getFichaGeneralResponse'] ['return'] ['instituciones'] ['datosPrincipales'] [ 'registros'] [1] .valor)' –