Skip to content
Advertisement

Yaml, Is there any method to add some character after call the anchor

For example

My yaml file(Test.yml):

JavaScript

Python code

JavaScript

Output get error

JavaScript

My expected output is

JavaScript

Advertisement

Answer

You can make your fruits be a sequence:

JavaScript

However you can not concatenate the scalar value Apple to other values, because YAML is a pure data serialization language and cannot process data in any way.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement