Splunk® Enterprise

Search Reference

Acrobat logo Download manual as PDF


Splunk Enterprise version 9.0 will no longer be supported as of June 21, 2024. See the Splunk Software Support Policy for details. For information about upgrading to a supported version, see How to upgrade Splunk Enterprise.
Acrobat logo Download topic as PDF

mvreverse

Description

The mvreverse command reverses the order of the values in a multivalue field.

Syntax

mvreverse(<value>)

Usage

The mvreverse command is a dataset processing command. See Command types.

Examples

Example 1:

Reverse the order of the values in the multivalue field a.

... | mvreverse(a)

Example 2:

Reverse the order of the values in the multivalue field by changing "1", "2", "3" to "3", "2", "1".

mvreverse(mvappend("1", "2", "3"))

Example 3:

Reverse the order of the values in multivalue field b to "3", "2", "1" in multivalue field a.

| makeresults | eval b = mvappend("1","2","3"), a=mvreverse(b)


See also

Commands
reverse
Last modified on 17 November, 2023
PREVIOUS
mvexpand
  NEXT
nomv

This documentation applies to the following versions of Splunk® Enterprise: 9.0.0, 9.0.1, 9.0.2, 9.0.3, 9.0.4, 9.0.5, 9.0.6, 9.0.7, 9.0.8, 9.0.9, 9.1.0, 9.1.1, 9.1.2, 9.1.3, 9.1.4, 9.2.0, 9.2.1


Was this documentation topic helpful?


You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters