well yeah i’m trying to figure it out how can i get values from my object comparing with a specific value.
For instance i have this values which is the version :
const currentVersion: 4.1.0
but also i have this object telling me how many percetage of user have the current version or above
const versionResults = {
"2.29.0": 1.0204081632653061,
"4.0.0": 1.0204081632653061,
"4.1.0": 41.83673469387756,
"4.1.1": 56.12244897959188
}
i need to create an object that basically comparing with the current version sum the value of the object 4.1.0 & also 4.1.1.
So the final result should be like this:
results = {
aboveOrEqualThanCurrentVersion : 97.95 //Sum of 4.1.1 & 4.1.0
lessThanCurrentVersion : 2.05 //Sum of 4.0.0 & 2.29.0
}
1