First of all take advantage of the new literal string syntax to avoid the confusion of the escaped double quotes.
Second of all please conform to the naming convention that variables are camelCased
Assumed variables :
let name = "Foo"
let id = 1
let subid = 2
The strings look much clearer.
let nlpJsonString = """
{"appId":"**********","cloud":true}
"""
let cmdJsonString = """
{"asr":"","id":\(id),"name":"\(name)","nlp":"\(nlpJsonString)","subid":\(subid)}
"""
As you can see (better now) nlpJsonString is inserted as String (note the wrapping double quotes) so the result is
{"asr":"","id":1,"name":"Foo","nlp":"{"appId":"**********","cloud":true}","subid":2}
If you want to insert nlpJsonString as a dictionary remove the double quotes
let cmdJsonString = """
{"asr":"","id":\(id),"name":"\(name)","nlp":\(nlpJsonString),"subid":\(subid)}
"""
then you get
{"asr":"","id":1,"name":"Foo","nlp":{"appId":"**********","cloud":true},"subid":2}
An alternative is to create dictionaries and serialize them
let name = "Foo"
let id = 1
let subid = 2
let nlpDict : [String:Any] = ["appId":"**********","cloud":true]
let cmdDict : [String:Any] = ["asr":"","id":id,"name":name,"nlp":nlpDict,"subid":subid]
do {
let jsonData = try JSONSerialization.data(withJSONObject: cmdDict)
let json = String(data: jsonData, encoding: .utf8)!
print(json)
} catch { print("something went wrong", error) }