Skip to content

Instantly share code, notes, and snippets.

@afranzi
Last active March 13, 2019 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afranzi/a06ab8db72fc30b88593bbc16228ec67 to your computer and use it in GitHub Desktop.
Save afranzi/a06ab8db72fc30b88593bbc16228ec67 to your computer and use it in GitHub Desktop.
JSLT evolution for a device-sensor-event
{
"user": {
"id": .userId
},
"device": {
"id": "undefined",
"platform": if(.p == "a") "Android" else "iPhone"
},
"product": {
"id": "remix",
"version": "0.0.0"
},
"data" : {
"version": .v
} + .s,
"source": "sensor",
"schema": "/schemas/events/device-sensor-event/1.json",
"createdAt": format-time(.t, "yyyy-MM-dd'T'HH:mm:ss'Z'")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment