Answer the question
In order to leave comments, you need to log in
How to match price from one JSON to another?
Good afternoon! I have JSON like this
{
"name": "Дмитрий Иванов",
"attr": "Ноут. HP-1111(владелец)\nНоут MSI модель666(владелец)"
}
{
"Ноут. HP-1111(владелец)": 18000,
"Ноут MSI модель666(владелец)": 13600,
"Ноут MSI модель667(владелец)": 136001
}
public class Noteboks
{
[JsonProperty("Ноут. HP-1111(владелец)")]
public string HP1{ get; set; }
[JsonProperty("Ноут MSI модель666(владелец)")]
public string MSI1{ get; set; }
}
Answer the question
In order to leave comments, you need to log in
And what, exactly, is the problem? Divide the line with the technique into paragraphs and look for the resulting lines in your price list. What is difficult for you? Split line at paragraph character? Iterate over the resulting elements? Look up each in a dictionary? Sum the found prices?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question