Hi,
This question is both DNET Non-DNET related, so not sure whether I should be asking about it here, apologies if not!
I'm trying to generate multiple embeds, and to populate them with data extracted from a JSON file. The JSON file is basically a single array of objects (with the same fields for each object).
The first value of each object is a unique ID.
How could I read, select and assign all values contained in an object, depending on its ID value?
I've tried first to read the file, then to assign the whole array to a variable (I'm using the Newtonsoft.Json NuGet package):
string text = File.ReadAllText(@"./objects.json");
//var objectsjson = JsonConvert.DeserializeObject(text);
Console.WriteLine(text);
//Console.WriteLine(objectsjson);
```But then I'm stuck, I can't seem to select a single value, for example by writing `text[0]` only the bracket would show up, instead of the first value which should be an ID.
So I think first I need to get the syntax right, and then figure out how to select an object based on its ID and finally store its values in a variable so as to then add them to the embed