Extract Json Node value based on sibling node value in Scripted assertion
I am having a JSON as below .I need to extract accountBalance based on accountNumber( value of which I need to take from a property ). I need to assert the balance with another value(which is sum of two properties value) thus I am using scripted assetions
I using groovy.json.JsonSlurper().parseText and able to get array of balance. But I need to get balance based on specific accountNumber ( which I am getting through messageExchange.modelItem.testStep.testCase.getPropertyValue("Account") )
Kindly help me with extracting the balance based on accountNumber value.Please let me know if there is better approach to do this.