0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Node-redのJSONata事例 ~特定のフィールド名を持つものだけを取り出す~

Posted at

#概要
タイトルの通りです。

#説明
payloadで渡された複数あるObjectの中で、msg_で始まるものだけを拾いたい場合は以下で動きます。

( 
$.payload.$sift(function($v, $k) { $match($k,/msg_/)});

)

というか、JSONataのドキュメントに載ってるsiftの事例まんまです。
謎なのは、/msg_/だと動くけど、/msg/だと動かない点。msgが予約語なんだろうか。。
あまり深く調べずに先に進んでしまったので、だれかご存知だったら教えてください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?