openresty / array-var-nginx-module

Add support for array-typed variables to nginx config files
http://openresty.org
67 stars 20 forks source link

How to get array positioned values and assign it to variable? #5

Open gowthaman-new opened 7 years ago

gowthaman-new commented 7 years ago

Hi, This module is awesome. How can i split array and assign array[0] to one variable(called A). split array[1] assign it to second variable(called B) and so on. May i know how i can achieve this. If there is any other way please let me know.

agentzh commented 6 years ago

@gowthaman-new If a particular usage is not mentioned in the docs or the test suite, then it is not there. You are always welcome to contribute pull requests for any new features. Thanks!

agentzh commented 6 years ago

@gowthaman-new Nowadays it's recommended, however, to use the ngx_lua module for such fancy stuff:

https://github.com/openresty/lua-nginx-module/

It can be much more flexible and much safer while still keeping great performance.