If api return response like screen dynamically, How can we detect data with api connector in workflow or element expression.
If somebody has experience in same issue, please help me.
Thanks.
Sadly the API Connector’s JSON parser can’t deal with dynamic key values.
You’ll have to set the data type of the API to text instead of JSON and parse it on your own on the client.
You could look into using a JSON plugin that helps you read the data.
Alternatively, you can just use just use native bubble custom states and use regex + split by to extract the list of dates & list of numbers.
Thank you for your quickly response.
So I am trying to use regex + split by to extract the list of dates & numbers.
For that, as you know, I need to convert date string to date conversation.
If you have some experience, pleas help me.
it’s parsed api response using regex.
Have you changed the API response to Text? Seems like its still on json.
Yes you’ll have to convert string into date, sadly Bubble doesn’t have an operator for that, despite it having a fully working date parser.
I think the best way is to use the Toolbox Plugin and use custom javascript.
Input the strings in javascript, and output, and set the Javascript to Bubble element’s output to a list of dates. It will change the strings into bubble-dates. It should just be one of code, and it will also give you the ability to change which parsing format to use. yyyy-mm-dd is quite unambiguous, but its generally good to have power over that.
Yes already changed response to text and parsed with regex.
Above screen is my api after parse response with regex.
Is there no other way to convert datestring to date type without run javascript?
You may be able to initialise it manually with all projected json pairs
Making na edit, spelt projected as protected
Thanks for your answer.
Can you show me example screen or project which convert date string to date type?