英文:
Upserting using Coda Pre-built Function in Pipedream
问题
我正在使用下面的变量路径来向Coda中执行数据的upsert操作。
{{steps.trigger.event.body.actions[0].name}}
上面的代码返回以下示例输出:
CO-DEN - IBC 2021
我真正想要插入的只是'CO-DEN',即输出中的第一个词。有没有办法对要upsert的数据进行分词处理?谢谢。
英文:
I am using the variable path below to upsert a data to Coda.
{{steps.trigger.event.body.actions[0].name}}
The code above returns an example output below:
CO-DEN - IBC 2021
What I really want to insert is only ‘CO-DEN’, the first word from the output. Is there anyway to tokenize the data to be upserted? Thanks.
答案1
得分: 1
可以。我可以帮助你使用简单且不太优雅的解决方案。只需使用split函数来实现你想要的效果。
示例中的代码如下:
var sentence = '{{steps.trigger.event.body.actions[0].name}}';
var firstWord = sentence.split(' ')[0];
英文:
Yes. I can help with the easy & ugly solution. Simply use the split function to achieve what you want.
In example:
var sentence = '{{steps.trigger.event.body.actions[0].name}}';
var firstWord = sentence.split(' ')[0];
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。



评论