使用Pipedream中的Coda预构建功能进行Upsert操作

huangapple go评论95阅读模式
英文:

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.

使用Pipedream中的Coda预构建功能进行Upsert操作

答案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];

huangapple
  • 本文由 发表于 2023年2月24日 16:37:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/75554280.html
  • coda
  • pipedream
  • pre-build-event
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定