To To retrieve value from Array

Hello,
I have the input in the for of array. How do i fetch specific value from that?
Example:
string[115]
{
“UK Truckrepairs Ltd”,
“”,“(NIGHT HEATER)”,
“”,
“”,
“”,
“Terms Total Net Amount £610.64”,
“”,
“TERMS ARE 30 DAYS FROM DATE OF INVOICE FOR ALL ACCOUNT”,
“”,
“CUSTOMERS. ALL PARTS REMAIN THE PROPERTY OF UK Total VAT Amount £122.13”,
“”,
“TRUCKREPAIRS LTD UNTIL PAID FOR IN FULL. THIS IS YOUR”,
“”,
“ORIGINAL & ONLY INVOICE Invoice Total £732.77”,
}

I need to fetch “Total VAT Amount £122.13” " from this array. using VB script

Hi @Nidhi_Kowalli1

Try the below syntax:

Assign-> Input= {"UK Truckrepairs Ltd", "", "(NIGHT HEATER)", "", "", "", "Terms Total Net Amount £610.64", "", "TERMS ARE 30 DAYS FROM DATE OF INVOICE FOR ALL ACCOUNT", "", "CUSTOMERS. ALL PARTS REMAIN THE PROPERTY OF UK", "Total VAT Amount £122.13", "TRUCKREPAIRS LTD UNTIL PAID FOR IN FULL. THIS IS YOUR", "", "ORIGINAL & ONLY INVOICE Invoice Total £732.77"}

Assign-> result = Input.Where(Function(x) x.Contains("Total VAT Amount")).FirstOrDefault()

Regards

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.