Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PROPOSAL] Random Choice in CSV #231

Closed
adrienaury opened this issue Jun 7, 2023 · 0 comments · Fixed by #233
Closed

[PROPOSAL] Random Choice in CSV #231

adrienaury opened this issue Jun 7, 2023 · 0 comments · Fixed by #233
Labels
enhancement New feature or request

Comments

@adrienaury
Copy link
Member

adrienaury commented Jun 7, 2023

version: "1"
masking:
  - selector:
      jsonpath: "pokemon"
    masks:
      - randomChoiceInCsv:
          uri: "https://gist.githubusercontent.com/armgilles/194bcff35001e7eb53a2a8b441e8b2c6/raw/92200bc0a673d5ce2110aaad4544ed6c4010f687/pokemon.csv"
          header: true          # csv has a header line
          separator: ","        # value separator is ,

Result with header=true

{
  "pokemon": {
    "#": 1,
    "Name": "Bulbasaur",
    "Type 1": "Grass",
    "Type 2": "Poison",
    "Total": 318,
    "HP": 45,
    "Attack": 49,
    "Defense": 49,
    "Sp. Atk": 65,
    "Sp. Def": 65,
    "Speed": 45,
    "Generation": 1,
    "Legendary": "False"
  }
}
@adrienaury adrienaury added the enhancement New feature or request label Jun 8, 2023
@adrienaury adrienaury linked a pull request Jun 14, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant