我正在使用Logic App,任务是进行一次HTTP调用,获取JSON,一次读取1条JSON记录,插入DB并重复。
此HTTP调用的输出是一个json数组:
[ { “ id”:1 “ name”:“ Leanne Graham”, “用户名”:“布雷”, “电子邮件”:“ Sincere@april.biz”, “地址”: { “街道”:“库拉斯之光”, “ suite”:“ Apt。556”, “ city”:“ Gwenborough”, “邮政编码”:“ 92998-3874”, “ geo”:{ “ lat”:“-37.3159”, “ lng”:“ 81.1496” } }, “ phone”:“ 1-770-736-8031 x56442”, “网站”:“ hildegard.org”, “公司”:{ “ name”:“ Romaguera-Crona”, “ catchPhrase”:“多层客户端-服务器神经网络”, “ bs”:“利用实时电子市场” } }, { “ id”:2 “ name”:“ Ervin Howell”, “ username”:“ Antonette”, “电子邮件”:“ Shanna@melissa.tv”, “地址”: { “街道”:“维克多平原”, “套房”:“套房879”, “ city”:“ Wisokyburgh”, “邮政编码”:“ 90566-7771”, “ geo”:{ “ lat”:“ -43.9509”, “ lng”:“-34.4618” } }, “ phone”:“ 010-692-6593 x09125”, “ website”:“ anastasia.net”, “公司”:{ “ name”:“ Deckow-Crist”, “ catchPhrase”:“主动的教学偶然性”, “ bs”:“协同可扩展的供应链” } }, { “ id”:3, “ name”:“ Clementine Bauch”, “用户名”:“ Samantha”, “电子邮件”:“ Nathan@yesenia.net”, “地址”: { “街道”:“道格拉斯扩展”, “套房”:“套房847”, “ city”:“ McKenziehaven”, “邮政编码”:“ 59590-4157”, “ geo”:{ “ lat”:“ -68.6102”, “ lng”:“-47.0653” } }, “电话”:“ 1-463-123-4447”, “网站”:“ ramiro.info”, “公司”:{ “名称”:“ Romaguera-Jacobson”, “ catchPhrase”:“面对面的分叉界面”, “ bs”:“启用电子策略应用程序” } }, { “ id”:4 “名称”:“ Patricia Lebsack”, “用户名”:“ Karianne”, “电子邮件”:“ Julianne.OConner@kory.org”, “地址”: { “街道”:“霍格购物中心”, “ suite”:“ Apt。692”, “ city”:“ South Elvis”, “邮政编码”:“ 53919-4257”, “ geo”:{ “ lat”:“ 29.4572”, “ lng”:“-164.2990” } }, “ phone”:“ 493-170-9623 x156”, “网站”:“ kale.biz”, “公司”:{ “名称”:“ Robel-Corkery”, “ catchPhrase”:“多层零容忍生产力”, “ bs”:“过渡性尖端Web服务” } }, { “ id”:5 “名称”:“切尔西·迪特里希”, “用户名”:“ Kamren”, “电子邮件”:“ Lucio_Hettinger@annie.ca”, “地址”: { “ street”:“ Skiles Walks”, “套房”:“套房351”, “ city”:“ Roscoeview”, “邮政编码”:“ 33263”, “ geo”:{ “ lat”:“-31.8129”, “ lng”:“ 62.5342” } }, “ phone”:“(254)954-1289”, “网站”:“ demarco.info”, “公司”:{ “名称”:“ Keebler LLC”, “ catchPhrase”:“以用户为中心的容错解决方案”, “ bs”:“革新端到端系统” } }, { “ id”:6 “名称”:“丹尼斯·舒利斯特夫人”, “用户名”:“ Leopoldo_Corkery”, “电子邮件”:“ Karley_Dach@jasper.info”, “地址”: { “ street”:“ Norberto Crossing”, “ suite”:“ Apt。950”, “ city”:“ South Christy”, “邮政编码”:“ 23505-1337”, “ geo”:{ “ lat”:“-71.4197”, “ lng”:“ 71.7478” } }, “ phone”:“ 1-477-935-8478 x6430”, “网站”:“ ola.org”, “公司”:{ “ name”:“ Considine-Lockman”, “ catchPhrase”:“同步的底线接口”, “ bs”:“启用电子创新应用程序” } }, { “ id”:7 “ name”:“ Kurtis Weissnat”, “用户名”:“ Elwyn.Skiles”, “电子邮件”:“ Telly.Hoeger@billy.biz”, “地址”: { “街道”:“雷克斯步道”, “套房”:“套房280”, “ city”:“ Howemouth”, “邮政编码”:“ 58804-1099”, “ geo”:{ “ lat”:“ 24.8918”, “ lng”:“ 21.8984” } }, “电话”:“ 210.067.6132”, “网站”:“ elvis.io”, “公司”:{ “ name”:“ Johns Group”, “ catchPhrase”:“可配置的多媒体任务组”, “ bs”:“生成企业电子零售商” } }, { “ id”:8 “ name”:“ Nicholas Runolfsdottir V”, “用户名”:“ Maxime_Nienow”, “电子邮件”:“ Sherwood@rosamond.me”, “地址”: { “街道”:“埃尔斯沃思峰”, “套房”:“套房729”, “ city”:“ Aliyaview”, “邮政编码”:“ 45169”, “ geo”:{ “ lat”:“-14.3990”, “ lng”:“-120.7677” } }, “ phone”:“ 586.493.6943 x140”, “网站”:“ jacynthe.com”, “公司”:{ “名称”:“ Abernathy Group”, “ catchPhrase”:“已实施的次要概念”, “ bs”:“启用电子的可扩展电子零售商” } }, { “ id”:9 “ name”:“ Glenna Reichert”, “用户名”:“ Delphine”, “电子邮件”:“ Chaim_McDermott@dana.io”, “地址”: { “街道”:“ Dayna公园”, “套房”:“套房449”, “ city”:“ Bartholomebury”, “邮政编码”:“ 76495-3109”, “ geo”:{ “ lat”:“ 24.6463”, “ lng”:“-168.8889” } }, “ phone”:“ (775)976-6794 x41206”, “网站”:“ conrad.com”, “公司”:{ “ name”:“ Yost and Sons”, “ catchPhrase”:“可切换的基于上下文的项目”, “ bs”:“聚合实时技术” } }, { “ id”:10, “名称”:“ Clementina DuBuque”, “用户名”:“ Moriah.Stanton”, “电子邮件”:“ Rey.Padberg@karina.biz”, “地址”: { “街道”:“凯蒂收费公路”, “套房”:“套房198”, “ city”:“ Lebsackbury”, “邮政编码”:“ 31428-2261”, “ geo”:{ “ lat”:“-38.2386”, “ lng”:“ 57.2232” } }, “电话”:“ 024-648-3804”, “网站”:“ ambrose.net”, “公司”:{ “名称”:“ Hoeger LLC”, “ catchPhrase”:“集中授权任务组”, “ bs”:“目标端到端模型” } } ]
在以下网址也可以看到输出:https://jsonplaceholder.typicode.com/users
现在在这个json数组中,我需要一次选择1条记录,并将其插入数据库。
我尝试将HTTP'Body'的输出传递给JsonParse()。 我还尝试将HTTP'Body'的输出传递给Initialize变量,然后进行foreach控件,但没有成功。