How to access link fields (url and text) value separately in views template? My views block has a Link field named field_link, attached to a Content Type named products, and I'm trying access link field values(url and text) separately in views template views-view-unformatted.html.twig. 

Following code gives the formatted html.

{{ row.content['#view'].style_plugin.render_tokens[ loop.index0 ]['{{ field_link }}'] }}


formatted html: 

&lt;a href="example.com/product-list" tabindex="-1"&gt;View Products&lt;/a&gt;


But I want to access the link fields(url and text) value separately. Any help will be appreciated.

I am not able to check row variable via kint/dump as I am getting PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted
The Easy way in Views UI add field_link 2 times.

in 1) Exclude from display, Select url only, and Show url as plain text.
which will give you the url only.



in 2) Exclude from display, and REWRITE RESULTS -> Strip HTML tags
which will give you the  title only.



Then in a custom field you can use twig  URL: {{ field_link }} Url Title: {{ field_link_1 }}

then in your custom template you can use them ... 

Option 2) almost as easy create a custom field formatter based on 
Drupal\link\Plugin\Field\FieldFormatter\LinkSeparateFormatter.php