How to create a 2d array of string in painless?

I want to create a 2-d array of String data type in painless.
I have tried several versions but all of them are giving me error.

String[][] myArray = {{'abc', 'pqr'}, {'xzy', 'ljk'}}
String[][] myArray = new String[][] {{'abc', 'pqr'}, {'xzy', 'ljk'}}
myArray = {{'abc', 'pqr'}, {'xzy', 'ljk'}}

The error I am getting is - invalid sequence of tokens near...

For 1st case, it's near ['[']
For 2nd case, it's near ['[']
For 3rd, it's near ['{']

I am using Elastic Version - 6.1

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.