I was trying to make one of my functions dynamic. but I ran into a problem where a method call of my object has to be dynamic via a parameter but when I ty to do this it always gives me an error saying '...' is not a function.
My original call
datacontext.graph.editUSerSkills(skills).then(function (data) { })
Now I need to get the "editUserSkills" dynamically.
I tried the following two options:
var graphAction = 'editUserSkills';
datacontext.graph.eval(graphAction)(items).then(function (data) {
datacontext.graph[graphAction](items).then(function (data) {
Obviously none of this worked so I really wonder how I should tackle this issue to make it dynamic.
Any help is much appreciated, Cheers.