Posting Data with Kimonolabs Webhook

本秂侑毒 提交于 2019-12-23 03:45:10

问题


I stuck at the problem, that if I want to post my Kimono Data via Webhook in my Database it gives me a JSON like this:

{ "name": "",..."results": {"collection1": [{ ...}]} 

The problem is that these kind of JSON creates one single row in my database with one attribute results where all my data is stored. But actually I need the elements in the result collection in different rows to be able to work with them. I tryed to transform the data with the given feature in Kimonolabs but i doesn't think it's gonna work like this.

Does anybody have an idea how to fix this issue?


回答1:


I've found a little workaround. When you create a class for your Kimono data where you store the posts from the webhook, you can write a cloud code afterSave method. So if a new row in the Kimono class appears, the afterSafe method gets executed. Now you can split and modify your data and save it in a separate table. Works fine for me.



来源:https://stackoverflow.com/questions/32737073/posting-data-with-kimonolabs-webhook

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!