Board logo

标题: [问题求助] [已解决]PowerShell脚本能不能读取文件内容到变量 [打印本页]

作者: a6513375    时间: 2020-4-26 08:34     标题: [已解决]PowerShell脚本能不能读取文件内容到变量

本帖最后由 a6513375 于 2020-4-26 10:07 编辑

这里是解析json的源码
  1. $str = @'
  2. 这里填Cookies
  3. '@
  4. $json = ConvertFrom-json $str;
  5. $json.Body.id;
复制代码
譬如我的目录有个1.txt,我想读取他到一个变量并解析json,能实现吗...?
下面是json  有点长
1.txt内容
  1. {"Code":"OK","Body":[{"id":39224606,"title":"Once Upon a Time","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224606","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224606","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224606"},{"id":39227585,"title":"Start Menu","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227585","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227585","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227585"},{"id":39224607,"title":"Your Best Friend","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224607","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224607","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224607"},{"id":39227586,"title":"Fallen Down","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227586","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227586","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227586"},{"id":39224608,"title":"Ruins","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224608","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224608","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224608"},{"id":39227587,"title":"Uwa!! So Temperate\u266b","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227587","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227587","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227587"},{"id":39224609,"title":"Anticipation","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224609","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224609","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224609"},{"id":39227588,"title":"Unnecessary Tension","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227588","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227588","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227588"},{"id":39224610,"title":"Enemy Approaching","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224610","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224610","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224610"},{"id":39227589,"title":"Ghost Fight","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227589","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227589","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227589"},{"id":39224612,"title":"Determination","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224612","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224612","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224612"},{"id":39227591,"title":"Home","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227591","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227591","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227591"},{"id":39224614,"title":"Home (Music Box)","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224614","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224614","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224614"},{"id":39227592,"title":"Heartache","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227592","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227592","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227592"},{"id":39224615,"title":"sans.","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224615","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224615","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224615"},{"id":39227593,"title":"Nyeh Heh Heh!","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227593","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227593","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227593"},{"id":39224616,"title":"Snowy","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224616","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224616","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224616"},{"id":39227594,"title":"Uwa!! So Holiday\u266b","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227594","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227594","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227594"},{"id":39224617,"title":"Dogbass","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224617","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224617","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224617"},{"id":39227595,"title":"Mysterious Place","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227595","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227595","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227595"},{"id":39224618,"title":"Dogsong","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224618","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224618","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224618"},{"id":39227596,"title":"Snowdin Town","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227596","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227596","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227596"},{"id":39224619,"title":"Shop","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224619","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224619","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224619"},{"id":39227597,"title":"Bonetrousle","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227597","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227597","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227597"},{"id":39224620,"title":"Dating Start!","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224620","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224620","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224620"},{"id":39227598,"title":"Dating Tense!","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227598","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227598","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227598"},{"id":39224621,"title":"Dating Fight!","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224621","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224621","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224621"},{"id":39227599,"title":"Premonition","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227599","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227599","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227599"},{"id":39224622,"title":"Danger Mystery","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224622","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224622","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224622"},{"id":39227600,"title":"Undyne","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227600","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227600","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227600"},{"id":39224623,"title":"Waterfall","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224623","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224623","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224623"},{"id":39227601,"title":"Run!","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227601","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227601","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227601"},{"id":39224624,"title":"Quiet Water","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224624","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224624","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224624"},{"id":39227602,"title":"Memory","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227602","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227602","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227602"},{"id":39224625,"title":"Bird That Carries You Over A Disproportionately Small Gap","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224625","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224625","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224625"},{"id":39227603,"title":"Dummy!","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227603","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227603","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227603"},{"id":39224626,"title":"Pathetic House","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224626","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224626","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224626"},{"id":39227604,"title":"Spooktune","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227604","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227604","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227604"},{"id":39224627,"title":"Spookwave","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224627","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224627","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224627"},{"id":39227605,"title":"Ghouliday","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227605","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227605","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227605"},{"id":39227606,"title":"Chill","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227606","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227606","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227606"},{"id":39224628,"title":"Thundersnail","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224628","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224628","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224628"},{"id":39227607,"title":"Temmie Village","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227607","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227607","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227607"},{"id":39224629,"title":"Tem Shop","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224629","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224629","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224629"},{"id":39227608,"title":"NGAHHH!!","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227608","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227608","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227608"},{"id":39224630,"title":"Spear of Justice","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224630","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224630","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224630"},{"id":39227609,"title":"Ooo","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227609","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227609","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227609"},{"id":39224631,"title":"Alphys","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224631","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224631","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224631"},{"id":39227610,"title":"It's Showtime!","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227610","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227610","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227610"},{"id":39227611,"title":"Metal Crusher","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227611","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227611","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227611"},{"id":39224632,"title":"Another Medium","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224632","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224632","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224632"},{"id":39227612,"title":"Uwa!! So HEATS!!\u266b","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227612","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227612","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227612"},{"id":39224633,"title":"Stronger Monsters","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224633","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224633","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224633"},{"id":39224634,"title":"Hotel","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224634","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224634","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224634"},{"id":39227613,"title":"Can You Really Call This A Hotel, I Didn't Receive A Mint On My Pillow Or Anything","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227613","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227613","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227613"},{"id":39224635,"title":"Confession","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224635","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224635","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224635"},{"id":39227615,"title":"Live Report","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227615","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227615","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227615"},{"id":39224636,"title":"Death Report","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224636","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224636","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224636"},{"id":39227616,"title":"Spider Dance","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227616","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227616","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227616"},{"id":39224637,"title":"Wrong Enemy !?","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224637","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224637","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224637"},{"id":39224638,"title":"Oh! One True Love","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224638","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224638","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224638"},{"id":39227617,"title":"Oh! Dungeon","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227617","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227617","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227617"},{"id":39224639,"title":"It's Raining Somewhere Else","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224639","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224639","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224639"},{"id":39227618,"title":"CORE Approach","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227618","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227618","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227618"},{"id":39224640,"title":"CORE","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224640","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224640","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224640"},{"id":39227619,"title":"Last Episode!","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227619","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227619","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227619"},{"id":39224641,"title":"Oh My...","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224641","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224641","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224641"},{"id":39227620,"title":"Death by Glamour","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227620","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227620","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227620"},{"id":39227621,"title":"For the Fans","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227621","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227621","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227621"},{"id":39224642,"title":"Long Elevator","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224642","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224642","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224642"},{"id":39227624,"title":"Undertale","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227624","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227624","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227624"},{"id":39227623,"title":"Song That Might Play When You Fight Sans","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227623","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227623","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227623"},{"id":39224644,"title":"The Choice","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224644","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224644","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224644"},{"id":39227625,"title":"Small Shock","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227625","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227625","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227625"},{"id":39224645,"title":"Barrier","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224645","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224645","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224645"},{"id":39227626,"title":"Bergentr\u00fcckung","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227626","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227626","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227626"},{"id":39224646,"title":"ASGORE","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224646","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224646","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224646"},{"id":39227627,"title":"You Idiot","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227627","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227627","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227627"},{"id":39224647,"title":"Your Best Nightmare","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224647","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224647","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224647"},{"id":39227628,"title":"Finale","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227628","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227628","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227628"},{"id":39224648,"title":"An Ending","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224648","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224648","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224648"},{"id":39227629,"title":"She's Playing Piano","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227629","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227629","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227629"},{"id":39224649,"title":"Here We Are","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224649","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224649","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224649"},{"id":39227630,"title":"Amalgam","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227630","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227630","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227630"},{"id":39224650,"title":"Fallen Down (Reprise)","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224650","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224650","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224650"},{"id":39227631,"title":"Don't Give Up","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227631","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227631","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227631"},{"id":39224651,"title":"Hopes and Dreams","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224651","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224651","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224651"},{"id":39227632,"title":"Burn in Despair!","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227632","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227632","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227632"},{"id":39224653,"title":"SAVE the World","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224653","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224653","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224653"},{"id":39227633,"title":"His Theme","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227633","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227633","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227633"},{"id":39227634,"title":"Final Power","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227634","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227634","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227634"},{"id":39224654,"title":"Reunited","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224654","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224654","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224654"},{"id":39224655,"title":"Menu (Full)","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224655","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224655","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224655"},{"id":39224656,"title":"Respite","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224656","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224656","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224656"},{"id":39224657,"title":"Bring It In, Guys!","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224657","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224657","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224657"},{"id":39224658,"title":"Last Goodbye","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224658","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224658","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224658"},{"id":39227636,"title":"But the Earth Refused to Die","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227636","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227636","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227636"},{"id":39227637,"title":"Battle Against a True Hero","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227637","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227637","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227637"},{"id":39227638,"title":"Power of \"NEO\"","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227638","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227638","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227638"},{"id":39224659,"title":"MEGALOVANIA","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39224659","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39224659","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39224659"},{"id":39227639,"title":"Good Night","author":"Toby Fox","url":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=url&id=39227639","pic":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=pic&id=39227639","lrc":"https:\/\/api.mlwei.com\/music\/api\/wy\/?key=523077333&cache=1&type=lrc&id=39227639"}]}
复制代码
我尝试用Bat解析再用echo输出到ps1脚本,但是太长了读取不了..
作者: ivor    时间: 2020-4-26 09:25

本帖最后由 ivor 于 2020-4-26 10:26 编辑

1.你提供的json数据前面少{
$json.Body.id是可行的,已更正
作者: a6513375    时间: 2020-4-26 09:28

回复 2# ivor


1.{已补
2.是啥意思
我的意思是读取1.txt然后解析json的Body.id
作者: went    时间: 2020-4-26 09:39

  1. $json=Get-Content "1.txt" | Out-String | ConvertFrom-Json
  2. $json.Body.id
复制代码

作者: went    时间: 2020-4-26 09:47

获取到的是id数组




欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2