Last active
March 13, 2019 14:16
-
-
Save afranzi/a06ab8db72fc30b88593bbc16228ec67 to your computer and use it in GitHub Desktop.
JSLT evolution for a device-sensor-event
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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