I
I
Ilya2015-04-23 17:01:55
In contact with
Ilya, 2015-04-23 17:01:55

How to pass list in one parameter to execute stored procedure?

For the test, I made the following code for the stored procedure execute.listResponse:

var groups_length = Args.list.length;
return groups_length;

I follow the link
https://api.vk.com/method/execute.listResponse?list="leprum,100"&access_token=my_token

And it returns to me . How to turn this string into a list, what would it return ? UPD : so far wrote something similar to this code{"response":12}{"response":2}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Gromadchuk, 2015-12-18
@FireGM

UPD :
I would like to edit my answer so that new people do not fall for this crutch. The answer below is outdated, today VKontakte stored procedures support the split method . Now no crutches are needed, it would be enough to callreturn Args.list.split(",")

Today I ran into your problem, a very simple and quick solution came to mind.
var groupList = Args.list;

var group_ids = API.groups.getById({
    group_ids: groupList
})@.id;

return group_ids;

215cda04dda4428686b7565099c217e5.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question