Hi Michael! Sorry, not yet. Working on it.
Hi Michael! Sorry, not yet. Working on it.
Hi Michael,
Here is the READFAVORITES service response generated automatically:
After you map favorites where you need you can parse value of each favorites element. Then assign these values to the appropriate elements.
As I can see, in favorites you get the following values:
{taxicompanyname=A 2 B Private Hire, town=BEDLINGTON, taxiemail=a href="mailto:gata2btravel@yahoo.co.uk" rel="nofollow"gata2btravel@yahoo.co.uk/a, taxiphone=01670 822021, textback=Text Back}
You can run the following code in mapping to parse values:
codevar i, j, arr, tmpArr, obj;
value = value.slice(1,-1);
arr = value.split(", ");
obj = {};
for (i = 0, j = arr.length; i < j; i++) {
tmpArr = arr.split('=');
obj[tmpArr[0].trim()] = tmpArr[1].trim();
}/code
As a result, you'll have all the values from needed favorites row in obj.
Hi Katya,
trying to understand this
do you mean
when I update "favorites" in database with service favoritesupdate
use the above code in mapping instead of
codereturn JSON.parse(value);/code
;
Hi Katya,
me again:)
I tried replacing code, it didn't work,
so I am not understanding
I need to know from the point of saving the labels to array in localstorage and map it to favorites in db,
is this where the code is used?
I cant create a col in db "favorites"
5 hours, no response, very unhappy
Hello Michael,
Sorry for delay, we are still working on it.
Thanks for the reply,
working on what?
the process is known, otherwise Katya would not have suggested, if you understand what Katya suggested can you please forward a simple guide
Did you try to use code which Katya suggested above?https://getsatisfaction.com/apperyio/...
Cheers Igor,
the service to update "favorites" from localstorage array into the db is "favoritesupdate"
I used the code Katya provided in the mapping, it didn't work.
Please debug and see where exactly the code fails. We will gladly help you, but you need to help us. It's challenging for us to help further when a reply is simply the code is not working. In general, custom app code is outside the scope of our support but we are still trying to help here.