[英]how to Remove last last json record in azure logic app?
{ " Date": "12/02/2022 15:01", "Product Code": "5057636582976207", "Description": "12022 3XL 372 Da", "Qty": "1", "Pricing Inc. VAT": "12" }, { " Date": "12/02/2022 15:33", "Product Code": "505763667606927", "Description": "18939 L 090 ", "Qty": "1", "Pricing Inc. VAT": "33" }, { " Date": "12/02/2022 17:07", "Product Code": "5057633566615660", "Description": "18905 ONE ", "Qty": "1", "Pricing Inc. VAT": "10" }, { " Date": "", "Product Code": "", "Description": "", "Qty": "96", "Pricing Inc. VAT": "1883.6" } the problem is price inc vat in last array will always change so cant use Replace() any idea? { " Date": "12/02/2022 15:01", "Product Code": "5057636582976207", "Description": "12022 3XL 372 Da", "Qty": "1", "Pricing Inc. VAT" : "12" }, { " Date": "12/02/2022 15:33", "Product Code": "505763667606927", "Description": "18939 L 090 ", "Qty": "1", " Pricing Inc. VAT": "33" }, { " Date": "12/02/2022 17:07", "Product Code": "5057633566615660", "Description": "18905 ONE ", "Qty": " 1", "Pricing Inc. VAT": "10" }, { " Date": "", "Product Code": "", "Description": "", "Qty": "96", "Pricing Inc. VAT": "1883.6" }问题是最后一个数组中的价格 inc vat 总是会改变所以不能使用 Replace() 有什么想法吗?
// Use add & length expression add(length(outputs('Compose')),-1) to remove the no of values
take(outputs('Compose'),add(length(outputs('Compose')),-1))
Here I am using your JSON payload and processed with it.在这里,我使用您的 JSON 有效载荷并对其进行处理。
{
"result": [
{
" Date": "12/02/2022 15:01",
"Product Code": "5057636582976207",
"Description": "12022 3XL 372 Da",
"Qty": "1",
"Pricing Inc. VAT": "12"
},
{
" Date": "12/02/2022 15:33",
"Product Code": "505763667606927",
"Description": "18939 L 090 ",
"Qty": "1",
"Pricing Inc. VAT": "33"
},
{
" Date": "12/02/2022 17:07",
"Product Code": "5057633566615660",
"Description": "18905 ONE ",
"Qty": "1",
"Pricing Inc. VAT": "10"
},
{
" Date": "",
"Product Code": "",
"Description": "",
"Qty": "96",
"Pricing Inc. VAT": "1883.6"
}
]
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.