on 06-27-2018 9:25 AM
Hi,
In my program I have my model like below
and now I want to update all objects inside this model which has path beginning with "/DeliveryOrderItemSet". Inside this entity set, there is a property called "Status", and I want to update all the "Status" to "Delivered". How can I do that in a proper way?
Thank
Tjarliman
Hello,
I found this way...
Dunno if it's the best way, but at least it works 😄
var Test={
"Testing('112')" : { Id: "112", Value: "5"},
"Testing('124')" : { Id: "124", Value: "2"},
"Testing('412')" : { Id: "412", Value: "4"},
"Testing('312')" : { Id: "312", Value: "9"}
}
Object.values(Test)
Returns you an array.
Object.keys(Test)
Returns you the keys
(4) ["Testing('112')", "Testing('124')", "Testing('412')", "Testing('312')"]
Object.keys(Test)[0]
Now that you have an array of each of them, loop them, and check if the string, contains your pattern. Or just do a split("(")[0]
And if it contains your EntitySet, then the position on the loop, will be the same ,as the one in the array list from the Object.values
I know maybe this isn't a proper way, but, what you are trying to archive isn't very "normal"
Hope this helps 🙂
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Cristian,
I got the idea, I will test it later.
I am sure it will work.
Cheers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.