Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

convert json in parse inputs azure function

#r "Newtonsoft.Json"

using System.Net;
using Newtonsoft.Json;

public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log)
{
    dynamic body = await req.Content.ReadAsStringAsync();
    var e = JsonConvert.DeserializeObject<EventData>(body as string);
    return req.CreateResponse(HttpStatusCode.OK, JsonConvert.SerializeObject(e));
}

public class EventData
{
    public string Category { get; set; }
    public string Action { get; set; }
    public string Label { get; set; }
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: how can prevent morgan to work in test enviroment 
Javascript :: set in Dynamo DB not properly incrementing nodejs lamnda function 
Javascript :: query sequnce graphql 
Javascript :: get foco a div 
Javascript :: how to save image in fabruc js json 
Javascript :: detecting change in animated value react native 
Javascript :: ESX.Math.Round 
Javascript :: adding growl delete notifications in vanilla js 
Javascript :: how to new tab disable after hit enter in javascript 
Javascript :: 4. You want to print the incremental count each time you instantiate a object using new in JS 
Javascript :: jquery not calling id from div called in ajax 
Javascript :: mvc set javascript variable from model 
Javascript :: remove etag express 
Javascript :: nesting in Jinja2 expressions 
Javascript :: how display same paragraph in all pages of website in js 
Javascript :: passing variable in table row delete button node js express 
Javascript :: string comparision in jsp 
Javascript :: react how to block render if data is not fetched yet 
Javascript :: stub in javascript 
Javascript :: get switchery to load after an ajax call 
Javascript :: chroma js 
Javascript :: jquery order by specific order 
Javascript :: copy link url javascript 
Javascript :: Ambobulamblation 
Javascript :: devolver array con indice de diferencia ejemplos javascript 
Javascript :: JSDOM - serialize() // returns dom as string 
Javascript :: json data from server into html table 
Javascript :: symbols with object.assign 
Javascript :: compbineReducers from redux 
Javascript :: 4.1. Values and Data Types¶ 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =