# Interface: PixiVNJsonIfElse<Then> (/pixi-vn-json/index/interfaces/PixiVNJsonIfElse)



Defined in: [src/schema/PixiVNJsonIfElse.ts:8](https://github.com/DRincs-Productions/pixi-vn-json/blob/f2528001a05fe854a897e0c1d03c7e311fe08af2/src/schema/PixiVNJsonIfElse.ts#L8)

If-Else condition for PixiVNJson

## Type Parameters [#type-parameters]

### Then [#then]

`Then`

## Properties [#properties]

### condition [#condition]

\> **condition**: [`PixiVNJsonConditions`](/pixi-vn-json/index/type-aliases/PixiVNJsonConditions)

Defined in: [src/schema/PixiVNJsonIfElse.ts:20](https://github.com/DRincs-Productions/pixi-vn-json/blob/f2528001a05fe854a897e0c1d03c7e311fe08af2/src/schema/PixiVNJsonIfElse.ts#L20)

The list of conditions to be checked.

if is a StorageElementType or a [PixiVNJsonValueGet](/pixi-vn-json/index/type-aliases/PixiVNJsonValueGet):

* if is a array or object, the condition is true if not empty
* if is a string, the condition is true if not empty
* if is a number, the condition is true if not zero
* if is a boolean, the condition is true if true
* if is null or undefined, the condition is false

***

### else? [#else]

\> `optional` **else?**: `PixiVNJsonIfElse`\<`Then`> | `Then`

Defined in: [src/schema/PixiVNJsonIfElse.ts:28](https://github.com/DRincs-Productions/pixi-vn-json/blob/f2528001a05fe854a897e0c1d03c7e311fe08af2/src/schema/PixiVNJsonIfElse.ts#L28)

The value to be returned if the condition is false.

***

### then [#then-1]

\> **then**: `PixiVNJsonIfElse`\<`Then`> | `Then`

Defined in: [src/schema/PixiVNJsonIfElse.ts:24](https://github.com/DRincs-Productions/pixi-vn-json/blob/f2528001a05fe854a897e0c1d03c7e311fe08af2/src/schema/PixiVNJsonIfElse.ts#L24)

The value to be returned if the condition is true.

***

### type [#type]

\> **type**: `"ifelse"`

Defined in: [src/schema/PixiVNJsonIfElse.ts:9](https://github.com/DRincs-Productions/pixi-vn-json/blob/f2528001a05fe854a897e0c1d03c7e311fe08af2/src/schema/PixiVNJsonIfElse.ts#L9)
