hey
im using a certain api that returns to me a big string.
this string length changes depend of the data i send.
for 2 hours im breaking my head to find a solotion no luck.
this string can contain 400 length and 145 length or 2000 length so it changes.
i used mid and indexOf but still its not precise.
this is the string
{"results":{"status":"success","code":0,"description":"operation has been success"},"data":{"transaction":{"uid":"ccb137af-43bf-48d7-b377-4012377afb75","number":"XXtehe","type":"api","date":"2021-07-12 13:46:12","status_code":"000","amount":180,"currency":"USD","credit_terms":"regular","payments":{"nu mber_of_payments":1,"first_payment_amount":0,"rest_payments_amount":0},"secure3D":{"status":false,"t racking":null},"approval_number":"0226435","voucher_number":"01-001-016","more_info":"","add_data":null},"data":{"customer_uid":"2395071f-c139-4517-aa0f-d95736667201","terminal_uid":"3c07bd69-600c-4cf8-a7dc-86308e99fb2b","cashier_uid":"4b9b7acf-1c67-46b3-a255-5269f973319e","items":[{"name":"","amount_pay":180,"discount_amount":0,"discount_type":null,"discount_value":null,"quantity ":1,"quantity_price":153.85,"product_uid":"9136daf9-2499-4787-817e-055797a1e5ad","vat":26.15}],"card_information":{"token":null,"four_digits":"6448","expiry_month":"10","expiry_year":"25","clear ing_id":2,"brand_id":7,"issuer_id":1}}}}
i marked in red the data i want to pull
this is the only data i need from this string.
tnx in advaned
salsa
:)
im using a certain api that returns to me a big string.
this string length changes depend of the data i send.
for 2 hours im breaking my head to find a solotion no luck.
this string can contain 400 length and 145 length or 2000 length so it changes.
i used mid and indexOf but still its not precise.
this is the string
Quote:
{"results":{"status":"success","code":0,"description":"operation has been success"},"data":{"transaction":{"uid":"ccb137af-43bf-48d7-b377-4012377afb75","number":"XXtehe","type":"api","date":"2021-07-12 13:46:12","status_code":"000","amount":180,"currency":"USD","credit_terms":"regular","payments":{"nu mber_of_payments":1,"first_payment_amount":0,"rest_payments_amount":0},"secure3D":{"status":false,"t racking":null},"approval_number":"0226435","voucher_number":"01-001-016","more_info":"","add_data":null},"data":{"customer_uid":"2395071f-c139-4517-aa0f-d95736667201","terminal_uid":"3c07bd69-600c-4cf8-a7dc-86308e99fb2b","cashier_uid":"4b9b7acf-1c67-46b3-a255-5269f973319e","items":[{"name":"","amount_pay":180,"discount_amount":0,"discount_type":null,"discount_value":null,"quantity ":1,"quantity_price":153.85,"product_uid":"9136daf9-2499-4787-817e-055797a1e5ad","vat":26.15}],"card_information":{"token":null,"four_digits":"6448","expiry_month":"10","expiry_year":"25","clear ing_id":2,"brand_id":7,"issuer_id":1}}}}
this is the only data i need from this string.
tnx in advaned
salsa
:)