Skip to content

Instantly share code, notes, and snippets.

@Zeerg
Created March 1, 2019 21:55
Show Gist options
  • Save Zeerg/5d18ff0b2fe1b21d9f88e5c8ae02e450 to your computer and use it in GitHub Desktop.
Save Zeerg/5d18ff0b2fe1b21d9f88e5c8ae02e450 to your computer and use it in GitHub Desktop.
A lambda to convert a json object to a sumologic field extraction rule.
json_body = {}
print(*map(lambda x: f"| parse \"{x}\\\":\\\"*\\\"\" as {x}\n", json_body))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment