Q:

Karate - match fails for inline array

I am trying to take some values from json and compare with array. 
Feature: sample
  Scenario: Sample scenario
    * def exp = {"firstname":"AAAA", "lastName":"XXXX"}
    * def actual = ['AAAA','XXXX']

    * match actual == [exp.firstname,exp.lastName]
    # I get error: path: $[0], actual: 'AAAA', expected: 'exp.firstname'

    # However Below code works fine
    * def arr = [exp.firstname,exp.lastName]
    * match actual == arr   # Works fine

Is it as expected ? is match not supporting making inline array ?

A:

Read this section of the docs carefully: https://github.com/intuit/karate#enclosed-javascript
* match actual == ([exp.firstname, exp.lastName])
* match actual == [ '#(exp.firstname)', '#(exp.lastName)' ]

