Skip to content

Support dynamic/anonymous properties change #1

@jkone27

Description

@jkone27

in some contexts the name of a field is not know, we want to support anonymous (runtime) property change, e.g.
using the dynamic? operator from FSharp data or using indexer .[...]

#r "nuget: FSharp.Data.Mutator, 0.1.0-beta"
open FSharp.Data.Mutator
open FSharp.Data
open FSharp.Data.JsonExtensions

type Test = JsonProvider<""" 
    { "name" : "hello"  }
""">

let sample = Test.GetSample()

sample 
|> Change (<@ fun x -> x.["newProperty"] = """{ "test": "hi" }""" @>)

at the moment Newtonsoft.Json can be used...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions