Hi @deanhystad
For the same scenario as below,where we have a description in number of lines,How do we retrieve all the lines.I used _line_ but it gave the information of only the first line
For the same scenario as below,where we have a description in number of lines,How do we retrieve all the lines.I used _line_ but it gave the information of only the first line
import json from ttp import ttp temp = """ System Info IPv4 configuration : {{ ipv4_configuration | _exact_ }} IPv6 configuration : {{ ipv6_configuration | _exact_ }} Description : {{description | _line_}} """ data_to_parse = """ System Info IPv4 configuration : Disabled IPv6 configuration : Enabled Description : It is used to connect to the network using the IPV6 and IPV4 which is secure """ parser = ttp(data=data_to_parse, template=temp) parser.parse() result = json.loads(parser.result(format="json")[0])[0] print(result)My output is
Output:{ipv4_configuration:'Disabled',ipv6_configuration:'Disabled',description': ' It is used to connect to the network '}