---
lang: en
title: 'API docs: rest.trie.match'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/rest
permalink: /doc/en/lb4/apidocs.rest.trie.match.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [Trie](./rest.trie.md) &gt; [match](./rest.trie.match.md)

## Trie.match() method

Match a route path against the trie

**Signature:**

```typescript
match(path: string): (ResolvedNode<T> & {
        node: NodeWithValue<T>;
    }) | undefined;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td markdown="1">

path


</td><td markdown="1">

string


</td><td markdown="1">

The route path, such as `/customers/c01`


</td></tr>
</tbody></table>

**Returns:**

([ResolvedNode](./rest.resolvednode.md)<!-- -->&lt;T&gt; &amp; { node: [NodeWithValue](./rest.nodewithvalue.md)<!-- -->&lt;T&gt;; }) \| undefined


