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
{"code":"^.orders@order.products@product.({\n product_name: product.name\n })[]","data":"{\n \"orders\": [\n {\n \"products\": [\n {\n \"name\": \"Smartphone\"\n }\n ]\n },\n {\n \"products\": []\n }\n ]\n }","bindings":"const bindings = {\n \"description\": \"Enter your bindings here\"\n };","result":{"output":[{"product_name":"Smartphone"}]},"type":"JsonTemplate","name":""} |
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
{"code":"[\n {\n \"input\": \"$.userId\",\n \"output\": \"$.user.id\"\n },\n {\n \"input\": \"$.discount\",\n \"output\": \"$.events[0].items[*].discount\"\n },\n {\n \"input\": \"$.products[?(@.category)].id\",\n \"output\": \"$.events[0].items[*].product_id\"\n },\n {\n \"input\": \"$.events[0]\",\n \"output\": \"$.events[0].name\"\n },\n {\n \"input\": \"$.products[?(@.category)].name\",\n \"output\": \"$.events[0].items[*].product_name\"\n },\n {\n \"input\": \"$.products[?(@.category)].category\",\n \"output\": \"$.events[0].items[*].product_category\"\n },\n {\n \"input\": \"$.products[?(@.category)].variations[*].size\",\n \"output\": \"$.events[0].items[*].options[*].s\"\n },\n {\n \"input\": \"$.products[?(@.category)].(@.price * @.quantity * (1 - $.discount / 100))\",\n \"output\": \"$.events[0].items[*].value\"\n },\n {\n \"input\": \"$.products[?(@.category)].(@.price * @.quantity * (1 - $.discount / 100)).sum()\",\n \"output\" |
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
{"code":"[\n {\n \"description\": \"Copies properties of a to root level in the output\",\n \"input\": \"$.a\",\n \"output\": \"$\"\n },\n {\n \"description\": \"Combines first and last name in the output\",\n \"input\": \"$.b[*].(@.firstName + ' ' + @.lastName)\",\n \"output\": \"$.items[*].name\"\n }\n]","name":"simple-example","type":"Mappings","data":"{\n \"a\": {\n \"foo\": 1,\n \"bar\": 2\n },\n \"b\": [\n {\n \"firstName\": \"foo\",\n \"lastName\": \"bar\"\n },\n {\n \"firstName\": \"fizz\",\n \"lastName\": \"buzz\"\n }\n ]\n}","bindings":"const bindings = {\n \"description\": \"Enter your bindings here\"\n };"} |
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
function(___d) { | |
let ___r; | |
let ___1; | |
let ___2; | |
let ___3; | |
let ___4; | |
let ___5; | |
let ___6; | |
let ___7; | |
let ___8; |
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
{"code":".employees..name","name":"descendant-operator","type":"JsonTemplate","data":"{\n \"employees\": [\n {\n \"id\": 1,\n \"name\": \"John\",\n \"department\": \"Sales\",\n \"subordinates\": [\n {\n \"id\": 2,\n \"name\": \"Alice\",\n \"department\": \"Marketing\"\n },\n {\n \"id\": 3,\n \"name\": \"Bob\",\n \"department\": \"Sales\"\n }\n ]\n },\n {\n \"id\": 4,\n \"name\": \"Emily\",\n \"department\": \"HR\",\n \"subordinates\": [\n {\n \"id\": 5,\n \"name\": \"Charlie\",\n \"department\": \"HR\"\n },\n {\n \"id\": 6,\n \"name\": \"David\",\n \"department\": \"Finance\"\n }\n ]\n }\n ]\n}\n","bindings":"const bindings = {\n \"description\": \"Enter your bindings here\"\n };"} |
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
{"code":"// Enter your JsonTemplate code here\n{\n dontBatchEvents: .events{.metadata.dontBatch},\n batchEvents: .events{!.metadata.dontBatch}\n}\n","name":"dontbatch","type":"JsonTemplate","data":"{\n \"events\": [\n {\n \"field1\": \"unique_value1\",\n \"field2\": \"unique_value2\",\n \"field3\": \"unique_value3\",\n \"metadata\": {\n \"dontBatch\": true\n }\n },\n {\n \"field1\": \"unique_value4\",\n \"field2\": \"unique_value5\",\n \"field3\": \"unique_value6\",\n \"metadata\": {\n \"dontBatch\": false\n }\n },\n {\n \"field1\": \"unique_value7\",\n \"field2\": \"unique_value8\",\n \"field3\": \"unique_value9\",\n \"metadata\": {\n \"dontBatch\": true\n }\n },\n {\n \"field1\": \"unique_value10\",\n \"field2\": \"unique_value11\",\n \"field3\": \"unique_value12\",\n \"metadata\": {\n \"dontBatch\": false\n }\n },\n {\n \"field1\": \"unique_ |
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
{ | |
"code": "# Enter your Workflow code here\nsteps:\n - name: productCosts\n template: |\n .orders.products.(.price * .quantity)\n - name: computeTotal\n template: |\n $.sum($.outputs.productCosts)\n\n", | |
"name": "OrdersWorkflow", | |
"type": "Workflow", | |
"data": "{\n \"orders\": [\n {\n \"order_id\": \"OD123456789\",\n \"customer_id\": \"CUS987654321\",\n \"order_date\": \"2024-03-01\",\n \"products\": [\n {\n \"product_id\": \"PROD001\",\n \"name\": \"Smartphone\",\n \"price\": 99,\n \"quantity\": 3\n },\n {\n \"product_id\": \"PROD002\",\n \"name\": \"Laptop\",\n \"price\": 999.99,\n \"quantity\": 1\n }\n ]\n },\n {\n \"order_id\": \"OD987654321\",\n \"customer_id\": \"CUS123456789\",\n \"order_date\": \"2024-03-02\",\n \"products\": [\n {\n \"product_id\": \"PROD002\",\n \"name\": \"Laptop |
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
{ | |
"code": "// Enter your JsonTemplate code here\n^.orders@order.products@product.({\n order_id: order.order_id,\n product_id: product.product_id,\n product_name: product.name,\n quantity: product.quantity,\n price: product.price,\n amount: product.price * product.quantity\n})", | |
"name": "Order-example", | |
"type": "JsonTemplate", | |
"data": "{\n \"orders\": [\n {\n \"order_id\": \"OD123456789\",\n \"customer_id\": \"CUS987654321\",\n \"order_date\": \"2024-03-01\",\n \"products\": [\n {\n \"product_id\": \"PROD001\",\n \"name\": \"Smartphone\",\n \"price\": 99,\n \"quantity\": 3\n },\n {\n \"product_id\": \"PROD002\",\n \"name\": \"Laptop\",\n \"price\": 999.99,\n \"quantity\": 1\n }\n ]\n },\n {\n \"order_id\": \"OD987654321\",\n \"customer_id\": \"CUS123456789\",\n \"order_date\": \"2024-03-02\",\n \"products\": [\n {\n |
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
const fs = require("fs"); | |
const jsonFilePath = process.argv[2] || "incidents.json"; | |
const isDir = fs.lstatSync(jsonFilePath).isDirectory(); | |
if(!isDir) { | |
const csv = getCSV(jsonFilePath); | |
csv.unshift("Title,DestType,Priority,Service,Namespace,WorkspaceId,CreatedAt"); | |
fs.writeFileSync("incidents.csv", csv.join("\n")); | |
} else { | |
const files = fs.readdirSync(jsonFilePath); | |
const csv = files.map(file => { |
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
AWSTemplateFormatVersion: 2010-09-09 | |
Description: S3 Bucket | |
Parameters: | |
BucketName: | |
Description: Name of the Bucket | |
Type: String | |
StorageClass: | |
Description: Storage class of the Bucket | |
Type: String | |
Default: Standard |
NewerOlder