Skip to content

Instantly share code, notes, and snippets.

@clement-joye
Created May 15, 2021 12:40
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 clement-joye/0c590584818c9acbc41e5d75864e999d to your computer and use it in GitHub Desktop.
Save clement-joye/0c590584818c9acbc41e5d75864e999d to your computer and use it in GitHub Desktop.
function postRequest(data: any, resource: DashboardCardResource, variables: { [key: string] : string }) {
Object.keys(resource.values).forEach(function(key) {
var query = SubtituteString(resource.values[key], variables).replace(/'/g, '"');
var result = jsonQuery(query, { data: data, allowRegexp: true });
variables[key] = result.value;
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment