powershell - Powershel: l parsing nested JSON -
I am working with PowerShell so that the result of an API call can be obtained as a JSON string of BrightPail: < / P>
I just want to retrieve the result section ....
"result": [[1,1,207,4,3, "2014-09- 18T14: 15: 50.000 -04: 00 ", 4" # 1014 ", 2], [2,1207,1,3," 2014-09-29T13: 20: 52.000-04: 00 ", 4" # 1015 " , 2], [3,1,207,1,3, "2014-09-29 T 13: 25: 39.000-04: 00", 4, "# 1016", 2]]} Using convert formats - Jason ($ BpResults.Content), I only get external JSON ....
PS C: & gt; Convert Frame-Jason $ BP Order. Content Response Reference -------- --------- @ {Metadata =; Results = System.Object []} @ {orderTypeNames =; OrderPaymentStatusNames =; OrderStatusNames ... I think some of the rest may be excavated in the system. Object [] ... but can not understand the syntax to reach it. Ideally, I want to write the result in the CSV file.
Any thoughts? "", "Original": {"metadata": {"results available": 3, "consequent": 3, "first result": 1, "final result": 3, "column": " {Name}: "orderId", "sortable": true, "filterable": true, "reportDataType": "IDSET", "required": false}, {"name": "orderTypeId", "", "filterable" : "Name": "contactId", "sortable": true, "true", "report data type": "integer", "reference data": ["name to type command"], "required" True, "reportDataType": true, "reportDataType": "INTEGER", "required": false}, {"name": "orderStatusId", "sortable": true, "filterable": true, "report data type": "INTEGER "True," report data type ":" int "Order Data": "Report Data": ["OrderStatusName"], "Required": Incorrect}, {"Name": "Orderstockstats ID", "Sortable" is true, "Report Data Type": "PERIOD True, "filterable" {"Name": "true", "required": wrong "}" ["orderStockStatusNames"], "required": wrong}, {"name": "created", "sortable" True, "fil is true," reportDataType ":" ReportDataType ":" INTEGER "," required ": false}, {" name ":" customerRef "," sortable "," created BIID "," sortable " ": True," filterable ": true," reportDaType ":" STRING "," "", "reference": ["order payment True, "Reportable Data": True, "Report Data Type": "Integer", "Required": Incorrect "wrong": "" "Order Payment Status ID", "Sortable": True, "Filterable" True, "filterable": true, "reportDataType": "IDSET", "required": false}, "direction", "reference", "sorting": "orderId", "sortable" ":" ASC "}]}," Result ": [[1, 1, 207, 4, 3," 2014-09-18T14: 15: 50.000-04: 00 ", 4," # 1014 ", 2] , [2, 1, 207, 1, 3, "2014-09-29 T 13: 20: 52,000-04: 00", 4, "# 1015", 2], [3, 1, 207, 1, 3 , "2014-09-29 T 13: 25: 39.000-04: 00", 4, "# 1016", 2]], "Reference": {"Order Typname": {"1": "SALES_ORDER"} , "Order Payment Statement": {"2": "PARTIALLY_PAID"}, " OrderTestasName ": {" 1 ":" Draft / Quotation "," 4 ":" Invoice ")," OrderstockstatsName ": {" 3 ":" Everything Complete "}}
Returns the object that you can see.
Comments
Post a Comment