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 3 years have passed since last update.

【enebular】switchから結果をjson変換する方法

Last updated at Posted at 2021-05-30

enebularのswitch機能を使った後に結果をjson変換する方法

enebularのswitch機能をネットで検索すると下のような条件分岐した後に終わりというものが多かった。
image.png

なので今回は条件分岐した後特定の値を設定しjsonに変換する方法を書く。

まずswitch後に値を設定するため、テンプレートを使用。
image.png

テンプレートの中身の値は今回json形式に変換するため以下のように設定。

{"value1":"値1","value2":"値2","value3":"値3"}

その後これらの値をjson変換する機能を用いて変換
image.png

全体像
image.png

変換機能はほかにもあるのでそれにあった形にテンプレートを使用すれば条件ごとに出力を変換出来る。

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?