when i try to use
foreach (JObject ii in jj.SelectTokens("$[?(@.total_amount > 2)]"))
the list is getting filtered properly for whole numbers. but if the json contains numbers with decimal eg. 25.3 or something i get the exception input string was not in correct format.
sample json:
[[{"doc_code":"123","doc_type":"update inventory","line_number":"1","doc_date":"6/15/2018","Cost Center":"Iconic Solutions","tax_calc_date":"","vendor_id":"Iconic Solutions","use_id":"1","tax_code":"tc105","item_id":"1","description":"desc1","quantity":"1","discount":"","tax_included":"","taxable_amount":"100","charged_tax":"","total_amount":"27.5","Ref1":"","Ref2":"","RevAcct":"","DestAddress":"103 madras","DestCity":"","DestRegion":"","DestPostalCode":"235692","DestCountry":"","OrigAddress":"86nasdnv","OrigCity":"","OrigRegion":"","OrigPostalCode":"23654","OrigCountry":"","DestLocationCode":"","OrigLocationCode":"","PurchaseingAgentCode":"","PurchaseOrderNo":"","address":"","city":"","region":"","postal_code":"","country":"","import_id":"72","company_id":"2","costcenter_id":"","marked_for_allocation":"","is_allocated":"","allocation_method":"","calculated_tax":"","marked_for_review":"","line_item_status":"","warning_status":"","insert_user":"","cutt_line_item_number":"","processing_stage":"","user_id":"21","cut_proc_number":"","variance":"0","purpose_id":"0","error_code_id":"0"}]]
What I have tried:
foreach (JObject lineItem in lineItem1.SelectTokens("$[?(@.total_amount > 1)]"))
is the code i have used and couldnt get it to work with json prop total_amount with 25.6 or any decimal value