-
How to access/reference JSON payload accepted at endpoint later in the function stack?
Hello, I've created an endpoint to accept a POST from TypeForm, which has a JSON payload. How do I reference the payload received in the request to the endpoint? I can see the payload when I click "Request History" in the menu for the endpoint, and can traverse the JSON there. But, when I try to reference it in the…
-
How to modify api input params to dynamically add columns and values ??
I am using metadata API, I need help with how to add columns in table dynamically along with the data. I figured out the column adding, but stuck on how to add the value in the table for that newly added column. Ex. { "data": "test", "int" : 123 } this is first object which has int as a new variable and need to add that in…
-
Need advice on JSON field
Hello everyone! I am new to Xano and using code as well but I need to learn so here I am. I have a database that has a list of weeks in them and then a JSON field that will sort a list of "splits", Inside each split is a list of "exercises" and inside each exercise is a list of "sets" (along with other information too).…
-
Reference variable in a variable?
Hi, I'm using a loop to manipulate an object. I need each loop to use a succesive element in my JSON data. For example: Loop 0 —> user.preference.0 Loop 1 —> user.preference.1 Loop 2 —> user.preference.2 Initially I thought I could simply use the loop's "index" variable (which tracks the loop's current iteration number) in…
-
Find a key/value in a json object
I am wondering if there is a universal way to find an element within an object without knowing the path. E.g. get the "id" value, without knowing the top level of the object (one/two/three). { "one": { "from": { "id": 123 } }} { "two": { "from": { "id": 123 } }} { "three": { "from": { "id": 123 } }} What is known and…
-
Handling JSON array inputs
I have a list of id's being passed from my front end, and when I copy the inputs this is the format they are arriving in: {"idList":"[4,5,6]","lessonID":"6","idListRef":"[1,2,3]"} The result is empty, which is not right. If I copy and past how it is received into the run and debug and remove the "" around the [], like…
-
Using JSON Schema in Xano
Hi, I want to define a JSON Schema in Xano in order to use the new function calling of OpenAI/GPT. Couldn't get it to work as the normal Object tries to treat the schema as an object and gives an error. Does somebody has a hint how to save the JSOn Schema in a variable?
-
I am passing 148 objects as a JSON input to an endpoint but only 67 are received, why?
Hi, I am passing information of 148 products like this ones (this products are retrieved from Meta's API): This list is passed as JSON variable "client_variants_meta" to another endpoint that uses this as an input. However, if we use the requests history to check the inputs of that other endpoint, it says that there were…
-
How can I ensure the create_object filter returns a null value in the object?
I have two lists, key_list = ["a", "b", "c"], values_list = [1,2,null]. The create_object filter will return {"a":1, "b":2}, the entry with null will not be included. What can I do to ensure {"a":1, "b":2, "c":null}?
-
Xano Expert needed for API creation
I'm a UX Designer building a SAAS using Xano + Weweb. I'm spending too much time trying to learn how to build (what for me) are complex APIs in Xano. My time is better spent building my Weweb front end. I'm confident that a developer who knows Xano well will be able to create these easily. So if you're a skilled Xano…
-
Can't apply json_decode to inputs...?
My app has a simple messaging feature. It turns out that if a user puts line breaks in their message, I get the error "Error parsing JSON: Control character error, possibly incorrectly encoded" I tried replacing "\n" with " " before decoding, but still got the error. In "Run & Debug", I rewrote the message totally from…
-
API doesn't return anything in response
I have this API endpoit that should return an employee object Here is the code invoking the API, the response JSON is empty, I don't understand how to read the data returned by the API.
-
Got OpenAI Completions API to return JSON, how can I transform it to be read as a list
I created some prompts in OpenAI's APIs that respond back with validated JSON. However, since it is in the response as a text string, I cannot figure out how to get Xano to recognize it as JSON (and then enable me to work with it as such). Example Output at response.result.choices.text: [ { "keyword": "cute", "sentiment":…
-
JSON Limitations
I have an external API that returns a JSON ~6000 lines of data (approx 1MB), that nests objects about ~10 levels deep at points. I'm finding that when the result is displayed in the debugger, some of the arrays are displaying as empty. To give you an idea of specifics, for the key-value pair headings is found at…
-
JSON to Individual text fields possible?
Hi, I am wondering if this is possible to achieve? From my head maybe with a function? I have a JSON field that when I receive the data, I would like to separate into different text fields. Example: JSON input…
-
More optimized way to get huge json into database
Hey guys, I am having a hard time getting a big number of rows into the database. Currently, I get zipped file from ftp, unzip it, split it into about 250 json files less than 1mb (otherwise, i get 413 error) and send it to xano api to insert the rows into my table, there are a total of 750000 rows in total. The problem…
-
'Get All Input' function causes 'Unable to decode input error'
Hi all, I'm having trouble getting the “Get All Input” function to work properly. My setup is as follows: I have a submission form on a Webflow page with POST action set to endpoint in Xano. The first function in this endoint's funtion Stack is “Get All Input” with json encoding. When I send some test data from the form in…
-
Code generation from string disallowed in this context
Hey guys, I'm trying to dynamically build a JSON object from a Javascript-end definition. My input is plain-text, like: "obj[people][name] = 'Anthony'; obj[people][age] = 19;" And I want to build a JSON object that I can work with in Xano. I am able to do it in Node.js locally, so I tried to use Lambdas and run that…
-
Json response sorting and editing
Hello Community Is there any way to manipulate the order of items in a json response? E.g. I use "set" filter to add an item and a new path+value is added at the bottom of json and I wish it was at the top. Oooh yes, I want it pretty :) Can I update an existing path of an item in json? I am currently doing "set" and…
-
HUGE BUG with Bulk record JSON add.
Hi @Chris Coleman I followed the bulk record add tutorial and can confirm all is working however there seems to be a massive bug when doing it in a real scenario... Please see the following 30 second video. For context, the bulk json works in the API creation page debugger but fails to work in real situation and also the…