Skip to content

Question, how to pull items into an array in a spec? #260

@adlmtl

Description

@adlmtl

Suppose I have a target:
{ 'a': 1, 'b': 2, 'c': [{ 'd': 3, 'e': 4 }] }

how would I write a spec to produce the output:
{ 'my_output': { 'a_and_b': [1, 2], 'c': [{ 'new_d': 3, 'new_e': 4 }] } }

the part I am hung up on, is how to take 'a' and 'b' and get them into an array...

spec = { 'my_output': { 'a_and_b': ['a', 'b'], 'c': ('c', [{'new_d': 'd', 'new_e': 'e'}]) } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions