Reply
Highlighted
Occasional Contributor
Posts: 5
Registered: ‎11-14-2016

How to Remove extra [] from the Xpath Expression Response.

Hi,

I am using XPath Assertion to compare expected value vs actual

 

Actual

XPath Assertion

//Response[1]/e/columns --- This provides concat values for all the nodes = column under Response/e . But, it gives extra []. Output = [[4.321808818872719,-22.80283626539684,6.0452621008568075,-15.671138277860097]]

 

Is there's a way to remove extra []?

 

My expected value is something like this. This uses "ResponseAsXML" 

 

[4.321808818872719,-22.80283626539684,6.0452621008568075,-15.671138277860097]

 

Frequent Contributor
Posts: 104
Registered: ‎08-04-2016

Re: How to Remove extra [] from the Xpath Expression Response.

It would help if you also post an XML document you are checking.

 

Karel

 

Community Hero
Posts: 3,723
Registered: ‎05-17-2013

Re: How to Remove extra [] from the Xpath Expression Response.

That could be because, result is list.
Regards,
Rao.