0
[{
        "Checklist_0": "1"
    }, {
        "Checklist_1": "0"
    }, {
        "Checklist_2": "1"
    }, {
        "Checklist_3": "0"
    }, {
        "Checklist_4": "0"
    }, {
        "Checklist_5": "1"
    }, {
        "Checklist_6": "0"
    }
]

This is what my out I need to replace all the Checklist_i values with one value

Any suggestions?

1 Answers1

1

Regular Expressions is one way

string result = new System.Text.RegularExpressions.Regex("Checklist_[\\d]").Replace(input, "foo");
fubo
  • 44,811
  • 17
  • 103
  • 137