How can you possibly measure inflammation much less attribute it to a single variable?
There’s a number of inflammation markers in the blood that can be measured directly via lab test (cRP, ESR, blood cell counts, ...).
As for attributing a body's reaction to a single food, there's something called the elimination diet where one isolates the variables one at a time. https://en.wikipedia.org/wiki/Elimination_diet?wprov=sfla1