Embedded expressions does not replace keys in JSON
See original GitHub issueRelated: https://github.com/intuit/karate/issues/512
Failing test below and in: https://github.com/ericdriggs/karate-key-template-bug
Feature:
Scenario:
* def key = 'Key'
* def payload =
"""
{
#(key): 1
}
"""
* match payload == { Key: 1 }
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Embeded expression doesn't work to replace key in JSON #512
lets say I am getting a value of a key from payload using get and assigning that as a value Def z =...
Read more >Resolving Keys Embedded within JSON - The Couchbase Blog
There are two things we need to do: get the key value for the “_id” from the document and second is ensure that...
Read more >Replace JSON key value without quotes - Stack Overflow
I have tried Embedded expression logic of #(temp) as well but it also does the same and makes it as a String with...
Read more >OPENJSON (Transact-SQL) - SQL Server - Microsoft Learn
OPENJSON is a table-valued function that parses JSON text and returns objects ... If a column name does not match a key name,...
Read more >JSON Configuration Syntax | Terraform - HashiCorp Developer
When a JSON string is encountered in a location where arbitrary expressions are expected, its value is first parsed as a string template...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@theathlete3141 yes 😉
@ericdriggs yes as per design, embedded expressions work only for values, not keys. here is what you need to do for your use-case: