This is my kotlin code so far: ```private fun res...
# pact-jvm
n
This is my kotlin code so far:
Copy code
private fun responseBody2(): DslPart? {

    return PactDslJsonArray.arrayEachLike()
            .`object`("type")
                    .`object`("content")
                     .stringType("title", "Search Results")
                    .closeObject()
            .closeObject()
            .`object`("type2")
                .`object`("content")
                    .stringType("price", "$500")
                    .stringType("subTitle", "")
                    .stringType("title", "")
                .closeObject()
            .closeObject()

}
b
As an aside: it's easier to read and write if you use the Java 8 lambda syntax, even in Kotlin 🙂
👍 1