0

nodejs を使用していて、json から文字列値を取得する必要があります。

json は次のようになります。

`result["DIDL-Lite"]["item"] = [ { '$': { id: '0/Spotify/Track', parentID: '0/Spotify', restricted: '0' },
'upnp:class': [ 'object.item.audioItem.musicTrack' ],
'raumfeld:section': [ 'Spotify' ],
'dc:title': [ 'Californication' ],
'upnp:artist': [ 'Red Hot Chili Peppers' ],
'upnp:album': [ 'Californication (Deluxe Version)' ],
'upnp:albumArtURI': [ [Object] ] } ]`

dc:title (またはその他の値) にアクセスするにはどうすればよいですか?

たとえば、さまざまな方法を試していますconsole.log(result["DIDL-Lite"]["item"]["dc:title"]);が、うまくいきません...

任意のヒント?よろしくお願いします!

4

0 に答える 0