The status 200 = that there was a positive result found.
{"status":200,"data":[{"customerId":1,"gender":"","firstName":"Marc","lastName":"Venken","dob":"0000-00-00","emailAddress":"marc@maveco.be","addressBookIds":"2","defaultBillingAddressId":2,"defaultDeliveryAddressId":2,"phoneNumber":"89853445","faxNumber":"","bankAccountNumber":"","subscribedToNewsletter":"0","guestAccount":1,"approved":1,"discountGroupId":0,"discountGroupName":"","groupDiscount":"0.00","numberOfLogins":1,"lastLoginDate":"2014-09-11 10:40:15","dateCreated":"2020-04-07 21:18:10","lastModified":"2020-04-07 21:18:11"}]}
It's a array of a kind, and I dislike arrays, because they always post me trouble )))
Can someone pull it appart, so that I have the result more easy like :
Customer : 1
firstname : Marc
Or even better, in a Xbrowse.
There was a post like this, but no luck.
- Code: Select all Expand view RUN
XBROWSER cText TITLE "HASH" NOMODAL
XBROWSER ArrayHashToArray( cText ) TITLE "ARRAY"
Static Function ArrayHashToArray( aData )
Local aReturn := Array( 0 )
Local hItems := { => }
Local hItem := { => }
Local aHeaders := Array( 0 )
Local aRow := Array( 0 )
Local nPositon := 0
for each hItems in aData
for each hItem in hItems
if aScan( aHeaders, hItem:__enumkey) == 0
aAdd( aHeaders, hItem:__enumkey )
Endif
next
next
aAdD( aReturn, aHeaders )
for each hItems in aData
aRow := Array( Len( aHeaders ) )
for each hItem in hItems
aRow[ aScan( aHeaders, hItem:__enumkey ) ] := hItem:__enumvalue
next
aAdD( aReturn, aRow )
next
Return ( aReturn )